You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an optimisation, I want to be able to memoize a key-hash. My current solution is double-hashing with the first hash being key -> u64, then the second hash using a no-op hasher from u64 -> u64. However, this requires storing the hash twice in the hashmap.
Ah, so, they're safe only because hash <> key mismatches result only in correctness errors, not memory safety errors. I'm not sure whether the same would be true for the concurrent structure in flurry. I think we could probably expose a similar API though! PRs welcome :)
As an optimisation, I want to be able to memoize a key-hash. My current solution is double-hashing with the first hash being key -> u64, then the second hash using a no-op hasher from u64 -> u64. However, this requires storing the hash twice in the hashmap.
I'm ok with such methods being unsafe if necessary, but the hashbrown equivalents are completely safe https://docs.rs/hashbrown/latest/hashbrown/hash_map/struct.RawEntryBuilder.html#method.from_key_hashed_nocheck
The text was updated successfully, but these errors were encountered: