Open Bug 735088 Opened 12 years ago Updated 2 years ago

Stop using crappy hash functions in the JS engine

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: justin.lebar+bug, Unassigned)

References

Details

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.
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
On the subject, it would be nice to remove JS_ROTATE_LEFT32 to remove the temptation in the future...
> 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: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.