This is adapted from a Reddit thread:
I use hash maps/sets often enough in Rust code, and I’m having troubles trying to avoid the slow&safe built-in hashing scheme.
Where I look for more hashing performance instead of safety, I’d like to replace code like this:
type Set = HashSet<(i32, i32)>; let mut s = Set::new();
With something similar to this (about 40 extra bytes of simple source
use std::hash::FastHasher; type Set = HashSet<(i32, i32), FastHasher>; let mut s = Set::new();
Is something with this level of simplicity & succinctness possible to archive with the future Rust standard library?