Add bench for multiple paragraphs with links and emphasis
@@ -13,6 +13,28 @@ mod to_html {
s
}
+ #[bench]
+ fn crdt_empty_options(b: &mut test::Bencher) {
+ let input_bytes = include_bytes!("../third_party/xi-editor/crdt.md");
+ let input = from_utf8(input_bytes).unwrap();
+
+ b.iter(|| render_html(&input, Options::empty()));
+ }
+
+ #[bench]
+ fn links_and_emphasis(b: &mut test::Bencher) {
+ let input = r#"""This is a [link](example.com). **Cool!**
+
+This is a [link](example.com). **Cool!**
+
+This is a [link](example.com). **Cool!**
+
+This is a [link](example.com). **Cool!**
+"""#;
+
+ b.iter(|| render_html(input, Options::empty()));
+ }
+
#[bench]
fn paragraph_lots_unescapes(b: &mut test::Bencher) {
let input = "This is by far my favourite unicode code point: &#xAAA; &#xAAA; &#xAAA; &#xAAA; &#xAAA; &#xAAA;
