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

Issue 2541353002: AstValueFactory: add a cache for one-character strings. (Closed)

Created:
4 years ago by marja
Modified:
4 years ago
Reviewers:
Toon Verwaest
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

AstValueFactory: add a cache for one-character strings. Lowercase 1 character strings occur frequently in minified code. Add a cache for them, so that we don't need to compute the hash + do the hash table lookup for each occurrence. BUG= Committed: https://crrev.com/f36497d2c901e548685c40962b0cabcfddae4cda Cr-Commit-Position: refs/heads/master@{#41597}

Patch Set 1 #

Total comments: 5

Patch Set 2 : rebased #

Patch Set 3 : code review (verwaest@) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -2 lines) Patch
M src/ast/ast-value-factory.h View 1 3 chunks +9 lines, -2 lines 0 comments Download
M src/ast/ast-value-factory.cc View 1 2 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
marja
wdyt? With this approach, we only save computing the hash + the hash table lookup ...
4 years ago (2016-12-01 12:43:35 UTC) #2
marja
(Forgot to say; I check that in minified code (example pulled from optimize.js) lower case ...
4 years ago (2016-12-01 12:47:47 UTC) #5
Toon Verwaest
lgtm https://codereview.chromium.org/2541353002/diff/1/src/ast/ast-value-factory.cc File src/ast/ast-value-factory.cc (right): https://codereview.chromium.org/2541353002/diff/1/src/ast/ast-value-factory.cc#newcode225 src/ast/ast-value-factory.cc:225: if (literal.length() == 1 && literal[0] >= 'a' ...
4 years ago (2016-12-05 15:30:41 UTC) #8
marja
thanks for review! https://codereview.chromium.org/2541353002/diff/1/src/ast/ast-value-factory.cc File src/ast/ast-value-factory.cc (right): https://codereview.chromium.org/2541353002/diff/1/src/ast/ast-value-factory.cc#newcode225 src/ast/ast-value-factory.cc:225: if (literal.length() == 1 && literal[0] ...
4 years ago (2016-12-08 15:09:59 UTC) #9
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/2541353002/40001
4 years ago (2016-12-08 15:13:03 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-08 15:39:39 UTC) #14
commit-bot: I haz the power
4 years ago (2016-12-08 15:40:09 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f36497d2c901e548685c40962b0cabcfddae4cda
Cr-Commit-Position: refs/heads/master@{#41597}

Powered by Google App Engine
This is Rietveld 408576698