News for hackers. Stuff that matters.
Re:The Lost Art of Structure Packing (2018) by shawxe on Monday April 27, 2020 @12:23PM (#22997282)
> Another solution, more along the lines of what I was thinking, is simply to associate the hash table with a hashing function which processes the type as a structure, hashing the members individually rather than as a pad of memory.

This solution is probably what I would go for in most cases as well. The most compelling reasons I can think of for going the other way would be if there were a desire to use a specific hashing function/algorithm on all keys regardless of type or if there were a desire to have keys of different types in the same map.

There are no comments on this comment yet.