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

Issue 2381303002: [base] Optimise hashmaps with simple key equality (Closed)

Created:
4 years, 2 months ago by Leszek Swirski
Modified:
4 years, 2 months ago
Reviewers:
rmcilroy
CC:
v8-reviews_googlegroups.com, rmcilroy
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[base] Optimise hashmaps with simple key equality Hashmaps with a simple key equality method (comparing pointers) don't need to waste cycles (and branches) comparing hash values, as the key comparison is cheap. This patch modifies the hashmap's MatchFun to take the hashes as well as the keys, thus allowing the MatchFun to ignore the hashes. This allows slightly cleaner generated code, especially when the MatchFun is inlined. BUG= Committed: https://crrev.com/306f83119b404eecaf28697e81fa8360a5237e5f Cr-Commit-Position: refs/heads/master@{#39932}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Total comments: 4

Patch Set 4 : Rename matcher structs to something more... verbose #

Patch Set 5 : Whoops, patches should compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -14 lines) Patch
M src/base/hashmap.h View 1 2 3 5 chunks +48 lines, -12 lines 0 comments Download
M src/interpreter/constant-array-builder.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter/constant-array-builder.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 27 (19 generated)
Leszek Swirski
Probably the last hashmap optimisation for now.
4 years, 2 months ago (2016-09-30 15:00:33 UTC) #14
rmcilroy
Just nits, LGTM. https://codereview.chromium.org/2381303002/diff/40001/src/base/hashmap.h File src/base/hashmap.h (right): https://codereview.chromium.org/2381303002/diff/40001/src/base/hashmap.h#newcode343 src/base/hashmap.h:343: struct HashKeyComp { Not sure on ...
4 years, 2 months ago (2016-09-30 16:07:15 UTC) #15
Leszek Swirski
https://codereview.chromium.org/2381303002/diff/40001/src/base/hashmap.h File src/base/hashmap.h (right): https://codereview.chromium.org/2381303002/diff/40001/src/base/hashmap.h#newcode343 src/base/hashmap.h:343: struct HashKeyComp { On 2016/09/30 16:07:15, rmcilroy wrote: > ...
4 years, 2 months ago (2016-10-03 14:33:28 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2381303002/60001
4 years, 2 months ago (2016-10-03 14:33:36 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/9773) v8_linux64_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 2 months ago (2016-10-03 14:36:46 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2381303002/80001
4 years, 2 months ago (2016-10-03 14:41:26 UTC) #24
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-10-03 15:07:19 UTC) #25
commit-bot: I haz the power
4 years, 2 months ago (2016-10-03 15:07:46 UTC) #27
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/306f83119b404eecaf28697e81fa8360a5237e5f
Cr-Commit-Position: refs/heads/master@{#39932}

Powered by Google App Engine
This is Rietveld 408576698