MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / bench_unpack_arithmetic

Function bench_unpack_arithmetic

src/pack.rs:642–654  ·  view source on GitHub ↗
(b: &mut Bencher)

Source from the content-addressed store, hash-verified

640 }
641
642 fn bench_unpack_arithmetic<const FACTOR: usize>(b: &mut Bencher) {
643 let unpacked_len = 1000;
644 let packed = pack_arithmetic::<FACTOR>(&vec![0; unpacked_len]);
645 let mut out = Vec::with_capacity(unpacked_len);
646
647 b.iter(|| {
648 let mut input = packed.as_slice();
649 let input = black_box(&mut input);
650 let unpacked_len = black_box(unpacked_len);
651 out.clear();
652 super::unpack_arithmetic::<FACTOR>(input, unpacked_len, black_box(&mut out)).unwrap();
653 });
654 }
655
656 macro_rules! bench_n {
657 ($bench:ident, $($n:literal),+) => {

Callers

nothing calls this directly

Calls 2

as_sliceMethod · 0.80
clearMethod · 0.80

Tested by

no test coverage detected