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

Issue 765473006: Make TemplateLiteral hashing algorithm more memory efficient (Closed)

Created:
6 years ago by caitp (gmail)
Modified:
6 years ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Project:
v8
Visibility:
Public.

Description

Make TemplateLiteral hashing algorithm more memory efficient Previously, a separate string to be hashed (in order to help determine the need to use a cached Template Call Site) was built up by joining UTF8 spans within a template. Now, the hash key is generated from the original spans, removing the need to allocate a new buffer and copy bytes into it. BUG=

Patch Set 1 #

Total comments: 5

Patch Set 2 : Change assertions in StringHasher extensions, add comment about hash key usage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -17 lines) Patch
M src/objects.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 1 chunk +24 lines, -0 lines 0 comments Download
M src/parser.cc View 1 5 chunks +9 lines, -17 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
caitp (gmail)
PTAL --- as suggested in crrev.com/745233002, it changes the hashing strategy to build rolling hashes ...
6 years ago (2014-11-27 00:31:03 UTC) #2
Dmitry Lomov (no reviews)
very nice. lgtm % style nits https://codereview.chromium.org/765473006/diff/1/src/objects-inl.h File src/objects-inl.h (right): https://codereview.chromium.org/765473006/diff/1/src/objects-inl.h#newcode6727 src/objects-inl.h:6727: DCHECK(chars && length ...
6 years ago (2014-11-27 07:23:05 UTC) #3
Dmitry Lomov (no reviews)
https://codereview.chromium.org/765473006/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/765473006/diff/1/src/parser.cc#newcode5350 src/parser.cc:5350: *hash = running_hash; Note that the actual hash value ...
6 years ago (2014-11-27 07:49:58 UTC) #4
caitp (gmail)
https://codereview.chromium.org/765473006/diff/1/src/objects-inl.h File src/objects-inl.h (right): https://codereview.chromium.org/765473006/diff/1/src/objects-inl.h#newcode6727 src/objects-inl.h:6727: DCHECK(chars && length > 0); On 2014/11/27 07:23:05, Dmitry ...
6 years ago (2014-11-27 14:44:49 UTC) #5
Dmitry Lomov (no reviews)
lgtm
6 years ago (2014-11-27 15:19:18 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/765473006/20001
6 years ago (2014-11-27 15:19:55 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
6 years ago (2014-11-27 15:47:47 UTC) #9
arv (Not doing code reviews)
6 years ago (2014-12-01 15:27:02 UTC) #10
Message was sent while issue was closed.
LGTM

Thanks. My earlier comment was not only about memory usage. I feel like the
usage of UTF8 and UTF16 is suspicious. I'll file a new bug.

Powered by Google App Engine
This is Rietveld 408576698