Bug 118616 - Consider changing hashing algorithm
Summary: Consider changing hashing algorithm
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-07-12 14:40 PDT by Ryosuke Niwa
Modified: 2022-10-05 00:32 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-07-12 14:40:19 PDT
Perhaps we might want to consider merging https://chromium.googlesource.com/chromium/blink/+/e82c2bf6f26388a1ce423b953478a564932ac857
or come up with an alternative:

Improve 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
Comment 2 Ahmad Saleem 2022-10-05 00:29:43 PDT
Do we have anything to merge here since the patch was reverted and I don't know whether it landed later or anything related.

Can we mark this as "RESOLVED WONTFIX"? Thanks!
Comment 3 Ryosuke Niwa 2022-10-05 00:32:11 PDT
This is won't fix. We don't do linear probing in HashTable. I guess that got diverged shortly after Blink fork? Regardless, this patch is quite irrelevant now.