DescriptionImprove WTF::HashTable performance by changing probing method
Our current HashTable implementation uses a linear probing system where
the delta is a hash of the given hash, which for integers requires
numerous shift and add operations to compute. This patch takes some
inspiration from CPython's dict implementation[1] to improve average
performance.
The new probing system is based off CPython's implementation -- we use a
linear congruential generator (x <- x*5+1), but for the first few probes
we also mix in the original hash (we shift this right by 5 each probe,
so we should use all the bits of the hash if the hash table is at least
32 objects big).
[1] http://svn.python.org/projects/python/trunk/Objects/dictobject.c
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153057
Patch Set 1 #
Total comments: 1
Patch Set 2 : just probe change #Patch Set 3 : rebaseline named-grid-line-get-set which depends on hashtable iteration order #
Messages
Total messages: 18 (0 generated)
|