Debunking "Faster than Rust": Malicious Benchmarks in Tov

18 points by ettolrach


xnacly

The second i saw the tov benchmarks i thought: no way these benchmarks are well done if thats the result, just a single look at the used datatypes in the benchmarks make this obvious. Nice to see someone actually took the time to put some numbers for the compare

mplant

I'm kind of confused about the dispatch benchmark. I took a look at the tov code and it seems to be testing dynamic dispatch. Changing the Rust code seems to be changing what the benchmark is actually measuring.

Obviously, "faster than rust" is hyperbole, you can basically always produce faster code in a lower level language for any given task, we've gone through this sort of thing a million times, but it is entirely possible that tov produces faster code for dynamic dispatch in this particular case

wink

You can call me a bad amateur Rust programmer, but I didn't know about ahash because std::collections::HashMap has been fine for me since I started writing Rust.

That's kinda the only part where I am not fully on board with the assessment. Quoting from the docs "While its performance is very competitive for medium sized keys, other hashing algorithms will outperform it for small keys such as integers as well as large keys such as long strings, though those algorithms will typically not protect against attacks such as HashDoS" - this does not read "omg it's slow" to me. But looking at the benchmark, it still seems ok.