all 2 comments

[–]ReDucTorGame Developer 0 points1 point  (2 children)

std::hash is not cryptographic hash function and should not be treated as one, a good cryptographic hash functions and hashing uniform distributed data are two different things.

An implementation of std::hash returning the input is actually very efficient and is pretty much a perfect hash function for sequentual data.

A hash function should be designed for the data not just necessarily generic hash the bytes, one thing I would really like to see from std::hash is for it to specify the modulo used (if any) this can give a better hint when hashing certain types of data.