Hacker News new | ask | show | jobs
by igouy 3401 days ago
Previously std::collections::HashMap was used with the default hash function --

[46.03 secs] http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...)

and then the hash function was changed to FnvHasher --

[17.10 secs] http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

and then better use of quad core with futures_cpupool --

[9.44 secs] http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

and now use of std::collections::HashMap has been replaced with an experimental hash table inspired by Python 3.6's new dict implementation --

[5.30 secs] http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

afaict comparing #4 to #5 is all about differences between that experimental hash table and std::collections::HashMap --

[9.14 secs] http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

2 comments

> afaict comparing Rust program #4 [5.30 secs] to Rust program #5 [9.14 secs] is all about differences between std::collections::HashMap and that experimental hash table.

There was also a small contribution (~6%) of working on bytes rather than strings according to the original PR: https://github.com/TeXitoi/benchmarksgame-rs/pull/39

Please check the source code for Rust #5.
> experimental hash table

When discussing whether or not to use this at least someone mentioned that there company was using it in production. I don't think it really counts as experimental.

"experimental" is descriptive, not prescriptive:

> Experimental hash table implementation in just Rust (stable, no unsafe code).

https://github.com/bluss/ordermap

That is how the author of ordermap currently describes ordermap at the top of the GitHub README.rst