wikiparser/benches/html_processing.rs
Evan Lloyd New-Schmidt 7d453d5e63 Reorganize html module
Signed-off-by: Evan Lloyd New-Schmidt <evan@new-schmidt.com>
2024-01-24 12:45:24 -08:00

20 lines
443 B
Rust

#![feature(test)]
extern crate om_wikiparser;
extern crate test;
use test::{bench::black_box, Bencher};
use om_wikiparser::html;
#[bench]
fn process_crimean_mountains(b: &mut Bencher) {
let text = include_str!("../tests/data/Q4185820-en/original.html");
// process lazy statics beforehand
black_box(html::process_str(text, "en").unwrap());
b.iter(|| {
black_box(html::process_str(text, "en").unwrap());
});
}