Stop using crappy hash functions in the JS engine

NEW
Unassigned

Status

()

Core
JavaScript Engine
6 years ago
4 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
Split off from bug 729940.  There, we stopped using crappy hash functions in Gecko.  But we didn't land for JS because of some small perf regressions which I'm still working out.
(Reporter)

Comment 1

6 years ago
Watch the Windows Dromaeo results below to see if simplifying the hash function from goldenratio * (rol(hash, 5) ^ val) to 33 * (hash ^ val) improves perf.

https://tbpl.mozilla.org/?tree=Try&rev=284fb758b848

Comment 2

6 years ago
On the subject, it would be nice to remove JS_ROTATE_LEFT32 to remove the temptation in the future...
(Reporter)

Comment 3

6 years ago
> Watch the Windows Dromaeo results below to see if simplifying the hash function from goldenratio * 
> (rol(hash, 5) ^ val) to 33 * (hash ^ val) improves perf.

I'm kicking more runs of Dromaeo, but it appears to be right beneath the cusp of statistically equal performance.

I really wonder why JS should be so sensitive to the hash function used here...
(Assignee)

Updated

4 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.