mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 21:17:39 +00:00
18 lines
428 B
Rust
18 lines
428 B
Rust
![]() |
use super::corpora;
|
||
|
use test::{black_box, Bencher};
|
||
|
|
||
|
#[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));
|
||
|
}
|