Skip to content

v2.0.0

Choose a tag to compare

@hoxxep hoxxep released this 23 Jul 22:46
· 212 commits to master since this release
0382026

What's Changed

  • Breaking: major refactor, hash output changes, and added compatibility for the V2 and V3 rapidhash algorithms.
  • Breaking, in-memory hashing: RapidHasher, RandomState, and RapidHashMap etc. have been moved to rapidhash::fast::RapidHasher and rapidhash::quality::RapidHasher.
    • The quality variant is similar to the old RapidHasher v1.x.x crate versions, with some performance improvements.
    • The fast variant is faster still by using FNV on integer types and skipping the final avalanche step.
    • An inner module is also available, to precisely configure rapidhash with compile time flags described in the README and docs.
  • Breaking, persistent hashing: rapidhash(bytes) moves to rapidhash::v3::rapidhash(bytes), with a module for each version.
    • For compatibility with the v1.x.x crate versions, rapidhash::v1::rapidhash_inline::<false, false, true>(bytes, seed) should be used.

Announcement on future versioning:

  • Persistent hash functions (rapidhash_v3(bytes) and similar methods) have a fixed hash output. New algorithm versions will be released as new functions. If there are ever further breaking changes to an existing function, this will only be done via a major version increment.
  • In-memory hashing with the rust Hasher trait (RapidHasher and related structs), may change its hash output between minor version increments. The Hasher trait does not guarantee stable hash outputs between rust compiler versions, and this also allows us to rapidly improve the in-memory hasher.

Full Changelog: https://github.com/hoxxep/rapidhash/blob/master/CHANGELOG.md