2023-11-26 18:28:53 -06:00
|
|
|
use test::{black_box, Bencher};
|
|
|
|
|
|
|
|
use super::corpora;
|
2024-07-28 17:13:50 -05:00
|
|
|
|
2023-11-26 18:28:53 -06:00
|
|
|
#[bench]
|
|
|
|
fn chars_advance_by_1000(b: &mut Bencher) {
|
|
|
|
b.iter(|| black_box(corpora::ru::LARGE).chars().advance_by(1000));
|
|
|
|
}
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn chars_advance_by_0010(b: &mut Bencher) {
|
|
|
|
b.iter(|| black_box(corpora::ru::LARGE).chars().advance_by(10));
|
|
|
|
}
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn chars_advance_by_0001(b: &mut Bencher) {
|
|
|
|
b.iter(|| black_box(corpora::ru::LARGE).chars().advance_by(1));
|
|
|
|
}
|