the.com/load factor

how full your hash table is before it starts throwing tantrums.

means the ratio of stored elements to total available slots in a hash table, used to decide when to resize.

from borrowed from electrical engineering, where load factor meant average load over peak capacity; computer science stole the metaphor for hash tables in the 1960s-70s as open addressing schemes needed a threshold to trigger rehashing.

for instance

java hashmapdoubles capacity once load factor exceeds 0.75

python dictresizes at two-thirds full, roughly 0.66

redis hash tableuses incremental rehashing to dodge load spikes

the.com/
what’s happening now · the.com · generated