D7116: rust-performance: introduce FastHashMap type alias for HashMap
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Thu Oct 17 19:30:56 EDT 2019
Alphare added a comment.
In D7116#104685 <https://phab.mercurial-scm.org/D7116#104685>, @kevincox wrote:
> I've seen very good results with https://github.com/servo/rust-fnv in the past so it is probably worth including that in the comparison and possibly using it. It is especially good for small keys which seems like a common case in hg.
The following comparison shows that for input > 20 bytes, fnv has worse overall performance than xx: https://cglab.ca/~abeinges/blah/hash-rs/.
I think that keys bigger than 20 bytes are pretty common: `mercurial/dirstate.py` is nested once and is already over 20 bytes. Maybe we could use fnv for cases other than the dirstate where we have mostly small keys, but that seems pretty cumbersome to me.
CHANGES SINCE LAST ACTION
To: Alphare, #hg-reviewers, kevincox
Cc: durin42, kevincox, mercurial-devel
More information about the Mercurial-devel