os-rust/library/core/benches/str.rs
Arpad Borsos 5fe296c6c5
Add benchmarks for impl Debug for str
In order to inform future perf improvements and prevent regressions,
lets add some benchmarks that stress `impl Debug for str`.
2024-05-01 09:54:29 +02:00

12 lines
226 B
Rust

use std::str;
use test::{black_box, Bencher};
mod char_count;
mod corpora;
mod debug;
mod iter;
#[bench]
fn str_validate_emoji(b: &mut Bencher) {
b.iter(|| str::from_utf8(black_box(corpora::emoji::LARGE.as_bytes())));
}