• Viktor Söderqvist's avatar
    Shrink dict without rehashing (#11540) · abf70309
    Viktor Söderqvist authored
    When we're shrinking the hash table, we don't need to hash the keys. 
    Since the table sizes are powers of two, we can simply mask the bucket 
    index in the larger table to get the bucket index in the smaller table. We 
    avoid loading the keys into memory and save CPU time.
    abf70309
dict.c 44.9 KB