Open vlovich opened 10 months ago
I'm not able to reproduce your results when I don't add memcache
or mimalloc
. I can try again later with those added.
Also, you can use NUM_ITEMS
directly since usize
implements IntoCounter\
:
- b.counter(divan::counter::ItemsCount::new(NUM_ITEMS))
+ b.counter(NUM_ITEMS)
memcache
is the name of my own crate - can be ignored. Strange that you're not seeing it. mimalloc
might be needed to make things more obvious. You must have a faster machine for this benchmark since my 13900 doesn't get that fast with the standard allocator.
My suspicion is that:
The benchmarks are varied by the size
parameter, which in turn affects the size of the values
slices, which makes the clone inside .with_inputs(..)
more expensive.
The with_inputs
time seems to be caught in the main benchmark time, hence the large difference between the benchmarks.
See #55
I have some benchmarks that looks like this:
There's a fairly large discrepancy between the two
This was run with mimalloc set as the allocator. AFAICT I'm not dropping any memory within the benchmark loop and the body of the loop shouldn't be doing anything more than shuffling some pointers around (i.e. should be the same amount of shuffling between the two runs I think). Is there something wrong with my benchmark or a bug in divan?