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:Steve Bennett <steveb@workware.net.au>
parent
7a518896
Please register or sign in to comment