fxhash
fxhash copied to clipboard
What's the relation with the rustc-hash crate?
I've noticed that FxHash(Map/Set) is also available in https://github.com/rust-lang/rustc-hash. How do the two crates relate? It looks like the same name/description. Which one should be preferred?
They both use the same hashing mechanism: self.hash.rotate_left(5).bitxor(i).wrapping_mul(K);
With a quick glance, it looks like the only difference is that this crate provides a 32 and 64 bit variant (ignoring the target platform). I think I needed that because procedural macros was detecting the current platform as the target platform, so I needed to swap out FxHash with FxHash32/64 within the procedural macro.
Otherwise, I'd probably prefer rustc-hash for it's simplicity (and they will probably maintain it :P).
Cool, then I'll use the rustc-hash
crate I guess :)
Perhaps this is something to add to the crate README?