3 ms·
What's with the hardcoded size though...
by Aardwolf 12y ago
What's with the hardcoded size though...
- snorkel 12y agoGenerally it's easier if the height of a hash table is a fixed value (which can be calculated once at runtime based on how much memory the table can consume) so that the hashing logic is: target_row_number = table_height % int_value_of_key If table height keeps changing then this formula would be inconsistent. This code isn't using % but kind of doing the same using &