Is fnv's FnvHasher algorithm stable?

#1

The stdlib’s DefaultHasher documentation warns:

The internal algorithm is not specified, and so it and its hashes should not be relied upon over releases.

Is the FnvHasher internal algorithm stable enough to guarantee the same hashes across versions?

0 Likes

#2

Given its history and that it hasn’t been touched in over a year and that it has a plethora of static tests I’d put my money on that it won’t change very much in the future. I’d also watch the repo just in case something changes.

0 Likes

#3

I’d also expect it to be stable because the name of the hash algorithm is there in the crate name and the documentation. The standard library hash function isn’t stable so as to allow it to be modified in the future (eg to fix a security bug), but if the fnv developers wanted to create a new algorithm they’d just create another crate.

4 Likes

#4

cool! thanks

0 Likes