Commit 70bdc32d authored by Steve Bennett's avatar Steve Bennett
Browse files

dict: consider dummy entries when determining when to expand hash table

This issue was caused by the fix in 24b23454



Because we used closed hashing for the dict hash table, it is important
that the table doesn't get too full, as it gets very inefficient due to
hash collisions. When allowing for space, also consider dummy entries that
consume slots. If there are too many dummy slots, the hash table is expanded,
clearing out the dummy slots.

Without this fix it is possible to get unlucky when filling a dictionary
and emptying it again (twice) will result all slots become dummy slots
and thus no more entries can be added.

See REGTEST 54

Signed-off-by: default avatarSteve Bennett <steveb@workware.net.au>
parent 7a518896
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment