3 ms·
His chart is very wrong: https://github.com/jonhoo/rust-evmap/blob/master/benchmark/read-throughput.png https://github.com/jonhoo/rust-evmap/blob/master/benchma
by NovaX 8y ago
His chart is very wrong:
https://github.com/jonhoo/rust-evmap/blob/master/benchmark/read-throughput.png https://github.com/jonhoo/rust-evmap/blob/master/benchmark/r...
Both Zipf (skewed) and Uniform distributions have the same read throughput. That would not occur because of hardware caches and memory effects. A Zipf means that some entries are read much, much more often (80/20 rule, hot/cold cache entries). The hardware caches should benefit from this and that is how you get superlinear effects.
A uniform is the same as a random access, e.g. all eviction policies would degrade to random replacement as there is no recency/frequency/locality benefits. This means if the dataset cannot reside entirely within the CPU cache then we should see a different throughput. Yet, they are the same.
His benchmarks only have 10k elements so maybe it all fits in the cpu cache. If that's true then 25M/s is absolutely awful. Something is wrong.