Best hashing functions for bool, char, int8_t, int16_t and all other simple types?

Hi everybody,
I’m looking more in depth about best hash functions for learning purpose mostly.

For bool type, I saw STL is returning 0 or 1 but Java returns 1231 or 1237. The Java approach looks more solid since 1231 and 1237 are prime numbers and also large numbers so the collision would be reduced and the combination of hash would be better. Would you recommend to use the Java approach for boolean?

For the other types, char, int8, uint8, int16, uint16, int32, uint32, int64 an

Published by CelleSports

CelleSports is a Game development, News outlet, and Social Cell community. Build your cells or teams for any game and start communicating efficiently. Join us in building the number one eSport and gaming community in the World. Join Cell eSports

Leave a comment