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

Issue 2792353002: [parser/ast] Reduce memory consumption for AstConsString. (Closed)

Created:
3 years, 8 months ago by vogelheim
Modified:
3 years, 8 months ago
Reviewers:
marja
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[parser/ast] Reduce memory consumption for AstConsString. The past re-factoring inadvertently increased memory consumption for AstConsString. This implements a micro-optimization to revert and slightly improve beyond the original state. Example, Zone size for parsing closure.js: - 20,999,848 B (before refactoring) - 21,651,056 B (after refactoring patch; 3.1% regression) - 20,641,320 B (after this CL; 1.7% improvement over original) (Reason: ZoneLinkedList requires 4 pointers to support the std::list functionality (Zone*, head/tail ptr, payload ptr). But since we only append and iterate in order and have the Zone* available in the context, a super simple linked list (value + next ptr) saves a bit of memory, especially for the common case of having 0 or 1 string segments.) BUG=v8:6902, chromium:706935 Review-Url: https://codereview.chromium.org/2792353002 Cr-Commit-Position: refs/heads/master@{#44385} Committed: https://chromium.googlesource.com/v8/v8/+/1769c7034ba4203c6301d5db5e3081b47585af0d

Patch Set 1 #

Patch Set 2 : Fix (and minor cleanup) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -15 lines) Patch
M src/ast/ast-value-factory.h View 3 chunks +21 lines, -5 lines 0 comments Download
M src/ast/ast-value-factory.cc View 1 2 chunks +13 lines, -8 lines 0 comments Download
M src/parsing/func-name-inferrer.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (12 generated)
vogelheim
3 years, 8 months ago (2017-04-04 12:46:24 UTC) #4
vogelheim
ptal (original version was broken; should be fixed now)
3 years, 8 months ago (2017-04-04 13:32:43 UTC) #9
marja
lgtm (Offline discussion: ThreadedList, you can decide whether to use it or not. I'd slightly ...
3 years, 8 months ago (2017-04-04 13:44:54 UTC) #12
vogelheim
On 2017/04/04 13:44:54, marja wrote: > lgtm > > (Offline discussion: ThreadedList, you can decide ...
3 years, 8 months ago (2017-04-04 14:44:33 UTC) #13
marja
Ok, totally makes sense to use your version if it's slimmer!
3 years, 8 months ago (2017-04-04 14:47:28 UTC) #14
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/2792353002/20001
3 years, 8 months ago (2017-04-04 14:56:48 UTC) #16
commit-bot: I haz the power
3 years, 8 months ago (2017-04-04 15:38:26 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/1769c7034ba4203c6301d5db5e3081b4758...

Powered by Google App Engine
This is Rietveld 408576698