• Mark Olesen's avatar
    HashTbl avoid backward search in erase() · 2c73afb6
    Mark Olesen authored
    - The ideas as discussed in email
    
    - The speedup is really there.
    
    Before
    loop 0 - Erased 100000 elements:   3.82 s
    loop 1 - Erased 100000 elements:   11.45 s
    loop 2 - Erased 100000 elements:   19.46 s
    loop 3 - Erased 100000 elements:   27.73 s
    loop 4 - Erased 100000 elements:   38.74 s
    ^C
    
    After
    loop 0 - Erased 100000 elements (size 2900000 capacity 8388608) 0.01 s
    loop 1 - Erased 100000 elements (size 2800000 capacity 8388608) 0 s
    loop 2 - Erased 100000 elements (size 2700000 capacity 8388608) 0.01 s
    loop 3 - Erased 100000 elements (size 2600000 capacity 8388608) 0 s
    loop 4 - Erased 100000 elements (size 2500000 capacity 8388608) 0 s
    loop 5 - Erased 100000 elements (size 2400000 capacity 8388608) 0 s
    loop 6 - Erased 100000 elements (size 2300000 capacity 8388608) 0 s
    loop 7 - Erased 100000 elements (size 2200000 capacity 8388608) 0 s
    ...
    2c73afb6