The following implements a basic load factor check and resizes the hashtable when the load factor gets too large, which is controllable by MAXLOADFACTOR which is set at 75%. The resizing ratio is controllable by RESIZERATIO and the default of 4 was empirically picked on some large models. If the table gets too large, controlled by MAXSIZE it won't rehash to avoid OOM but rather degrade to linear time operations.
The following implements a basic load factor check and resizes the hashtable when the load factor gets too large, which is controllable by
MAXLOADFACTOR
which is set at 75%. The resizing ratio is controllable byRESIZERATIO
and the default of 4 was empirically picked on some large models. If the table gets too large, controlled byMAXSIZE
it won't rehash to avoid OOM but rather degrade to linear time operations.