mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 08:34:07 +02:00
bench groups
This commit is contained in:
parent
bf4d038c8d
commit
b054ca2595
1 changed files with 26 additions and 3 deletions
|
|
@ -120,6 +120,7 @@ fn perf_string<E: Endianness>((offset, buffer): (usize, BitReadBuffer<E>)) {
|
||||||
black_box(result);
|
black_box(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[library_benchmark(setup = build_string_buffer)]
|
#[library_benchmark(setup = build_string_buffer)]
|
||||||
#[bench::le_alligned(0, LittleEndian)]
|
#[bench::le_alligned(0, LittleEndian)]
|
||||||
#[bench::be_alligned(0, BigEndian)]
|
#[bench::be_alligned(0, BigEndian)]
|
||||||
|
|
@ -183,8 +184,30 @@ fn perf_struct<E: Endianness, Struct: BitRead<'static, E>>(
|
||||||
}
|
}
|
||||||
|
|
||||||
library_benchmark_group!(
|
library_benchmark_group!(
|
||||||
name = bench_read_group;
|
name = bench_read_primitives;
|
||||||
benchmarks = read_perf, perf_bool, perf_bytes, perf_f32, perf_f64, perf_string, perf_struct
|
benchmarks = read_perf, perf_bool, perf_f32, perf_f64
|
||||||
);
|
);
|
||||||
|
|
||||||
main!(library_benchmark_groups = bench_read_group);
|
library_benchmark_group!(
|
||||||
|
name = bench_read_string;
|
||||||
|
compare_by_id = true;
|
||||||
|
benchmarks = perf_string
|
||||||
|
);
|
||||||
|
|
||||||
|
library_benchmark_group!(
|
||||||
|
name = bench_read_bytes;
|
||||||
|
compare_by_id = true;
|
||||||
|
benchmarks = perf_bytes
|
||||||
|
);
|
||||||
|
|
||||||
|
library_benchmark_group!(
|
||||||
|
name = bench_read_struct;
|
||||||
|
benchmarks = perf_struct
|
||||||
|
);
|
||||||
|
|
||||||
|
main!(
|
||||||
|
library_benchmark_groups = bench_read_primitives,
|
||||||
|
bench_read_string,
|
||||||
|
bench_read_bytes,
|
||||||
|
bench_read_struct
|
||||||
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue