Edit: bytell_hash_map.cpp:464 bytell_hash_map.cpp:58
Apparently there's one extra layer of indirection via a lookup table to get the final offset.
So basically the metadata byte is a bitfield union of + status flag + status code (not sure it's actually required) or offset enum. The offset enum then indexes into a look up table, the result of which is the relative offset from the current index.
This boilerplate allows me to choose between std::unordered_map and flat_hash_map in my whole code just by toggling a compile time switch in my code. It ensures that the data structures has the same API than all other C++ containers.
well, I mean... if it was not configurable, it would not really be useful, except for toy examples, and for those the default std::unordered_map is more than sufficient. To be useful, a hash table implementation at least needs to allow to configure the hash function and the comparison operator.
I figure it works best if you over allocate slots, so that on average you only have to do very few hops on each linked list walk (or no walk at all).
Aside: This is the method employed by .NET's Dictionary<K,V> class.
Further - it's generally faster to use structure of arrays rather than array of structures, thus in the above scheme the dictionary items/payloads and the linked list pointers could be in separate arrays.