Closed nvzqz closed 4 months ago
usize implements IntoCounter<Counter = ItemsCount>, allowing Vec::len() to be used directly.
usize
IntoCounter<Counter = ItemsCount>
Vec::len()
The loaded example does not change between benchmarks, so there's no need to pass it via Bencher::with_inputs().
Bencher::with_inputs()
The parsed values are now black_box-ed to prevent them from being optimized out.
black_box
Removed comment from copy+pasted docs example.
Hi!
Thanks for the fix, and also for the efforts on Divan. I've never been a fan of Criterion so I'm happy to see alternatives taking shape :+1:
usize
implementsIntoCounter<Counter = ItemsCount>
, allowingVec::len()
to be used directly.The loaded example does not change between benchmarks, so there's no need to pass it via
Bencher::with_inputs()
.The parsed values are now
black_box
-ed to prevent them from being optimized out.Removed comment from copy+pasted docs example.