2 ms·
> Rust's `HashMap` and `HashSet` also do the same with the default hasher Technically no. Rust does use per-hashmap seeds for its keyed hashes (where many lan
by masklinn 2y ago
> Rust's `HashMap` and `HashSet` also do the same with the default hasher
Technically no.
Rust does use per-hashmap seeds for its keyed hashes (where many languages use per-process seeds).
Go does that, will also randomise iteration for each iteration (it randomises the start offset of the iteration). This latter operation has nothing to do with hashdos mitigation, and exists exclusively to frustrate accidental reliance on iteration order.
- znkr 2y agoYou would have that frustration anyway during toolchain upgrades if the map implementation changed from one go version to the next.