Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Issue 1158083002: Random hashes with a more cache-friendly distribution

Created:
5 years, 6 months ago by Erik Corry Chromium.org
Modified:
5 years, 6 months ago
Reviewers:
adamk, Toon Verwaest
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Random hashes with a more cache-friendly distribution This is a hashcode implementation for ES6 Map and Set that gives better locality of reference. This is a different more complicated version of https://codereview.chromium.org/1157073002/ that is less likely to cause problems for an open addressing hash (but note that ES6 Map and Set do not currently use open addressing). I put it here for reference. This one also gives a good speedup on the modified example from bug 4086. Where the original CL lowers runtime by 62%, this change only gives about 53% reduction. R=adamk@chromium.org, verwaest@chromium.org BUG=

Patch Set 1 #

Patch Set 2 : Revert inadvertent change! #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -1 line) Patch
M src/math.js View 2 chunks +39 lines, -1 line 1 comment Download

Messages

Total messages: 2 (0 generated)
Erik Corry Chromium.org
5 years, 6 months ago (2015-05-26 21:14:38 UTC) #1
Erik Corry Chromium.org
5 years, 6 months ago (2015-05-26 21:56:56 UTC) #2
https://codereview.chromium.org/1158083002/diff/20001/src/math.js
File src/math.js (right):

https://codereview.chromium.org/1158083002/diff/20001/src/math.js#newcode160
src/math.js:160: level_0 += 4;
This should perhaps be co-prime with powers of 2.  5 seems to work well too, for
example.

Powered by Google App Engine
This is Rietveld 408576698