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

Issue 1775403008: Replace PushIfAbsent by a Stack object (Closed)

Created:
4 years, 9 months ago by Toon Verwaest
Modified:
4 years, 9 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Replace PushIfAbsent by a Stack object This significantly speeds up String(array). BUG= Committed: https://crrev.com/d3583574780848476dbde62122317452fddddb99 Cr-Commit-Position: refs/heads/master@{#34745}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : move more to js #

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Total comments: 1

Patch Set 6 : Add test and comment #

Patch Set 7 : Rebase #

Patch Set 8 : Restore stringbuilder #

Patch Set 9 : #

Total comments: 1

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -178 lines) Patch
M src/js/array.js View 1 2 3 4 5 6 7 8 4 chunks +113 lines, -117 lines 0 comments Download
M src/js/json.js View 1 2 7 chunks +16 lines, -6 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -20 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M src/runtime/runtime-array.cc View 1 chunk +0 lines, -23 lines 0 comments Download
M src/runtime/runtime-strings.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -7 lines 0 comments Download
A test/mjsunit/json-stringify-stack.js View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (22 generated)
Toon Verwaest
ptal
4 years, 9 months ago (2016-03-10 15:15:19 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775403008/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775403008/20001
4 years, 9 months ago (2016-03-10 15:47:23 UTC) #4
Camillo Bruni
lgtm
4 years, 9 months ago (2016-03-10 15:50:38 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-10 16:08:10 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775403008/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775403008/40001
4 years, 9 months ago (2016-03-10 17:10:04 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775403008/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775403008/60001
4 years, 9 months ago (2016-03-10 17:12:03 UTC) #12
Camillo Bruni
adam could have a quick look at this? For me this CL is still ok
4 years, 9 months ago (2016-03-10 17:20:04 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-10 17:38:22 UTC) #16
Toon Verwaest
I guess I should declare the instance variables on Stack.prototype to avoid leaking them through ...
4 years, 9 months ago (2016-03-10 17:46:47 UTC) #17
adamk
Seems fine except for the exact bit that Toon already pointed out :) https://codereview.chromium.org/1775403008/diff/60001/src/js/array.js File ...
4 years, 9 months ago (2016-03-10 19:34:05 UTC) #18
Toon Verwaest
Updated the CL
4 years, 9 months ago (2016-03-10 19:47:46 UTC) #19
adamk
https://codereview.chromium.org/1775403008/diff/80001/src/js/array.js File src/js/array.js (right): https://codereview.chromium.org/1775403008/diff/80001/src/js/array.js#newcode181 src/js/array.js:181: Stack.prototype.length = null; Please add a comment noting that ...
4 years, 9 months ago (2016-03-10 19:53:55 UTC) #20
adamk
lgtm once the Object.prototype-avoidance is commented and tested
4 years, 9 months ago (2016-03-10 19:55:27 UTC) #21
Toon Verwaest
Added comment and test.
4 years, 9 months ago (2016-03-10 19:59:58 UTC) #22
adamk
still lgtm
4 years, 9 months ago (2016-03-10 20:06:25 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775403008/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775403008/100001
4 years, 9 months ago (2016-03-10 20:06:47 UTC) #26
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-10 23:24:17 UTC) #28
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/c91faa0b39b62025460eb9f8b578e20d88f3549e Cr-Commit-Position: refs/heads/master@{#34696}
4 years, 9 months ago (2016-03-10 23:24:31 UTC) #30
Benedikt Meurer
Awesome!
4 years, 9 months ago (2016-03-11 07:59:28 UTC) #32
Michael Achenbach
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/1785003004/ by machenbach@chromium.org. ...
4 years, 9 months ago (2016-03-11 08:39:44 UTC) #33
Michael Hablich
On 2016/03/11 08:39:44, Michael Achenbach wrote: > A revert of this CL (patchset #6 id:100001) ...
4 years, 9 months ago (2016-03-11 11:30:32 UTC) #34
Toon Verwaest
PTAL again. I restored the C++ stringbuilder since it handles huge arrays better. Large arrays ...
4 years, 9 months ago (2016-03-11 20:45:48 UTC) #37
Camillo Bruni
LGTM https://codereview.chromium.org/1775403008/diff/180001/src/js/array.js File src/js/array.js (right): https://codereview.chromium.org/1775403008/diff/180001/src/js/array.js#newcode196 src/js/array.js:196: return %StringBuilderConcat(elements, length, ''); As you said, you ...
4 years, 9 months ago (2016-03-14 10:09:52 UTC) #38
Toon Verwaest
I'll profile that; and if it makes sense do it in a follow-up CL.
4 years, 9 months ago (2016-03-14 12:21:43 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775403008/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775403008/200001
4 years, 9 months ago (2016-03-14 14:20:29 UTC) #45
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 9 months ago (2016-03-14 14:44:24 UTC) #47
commit-bot: I haz the power
4 years, 9 months ago (2016-03-14 14:45:14 UTC) #49
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/d3583574780848476dbde62122317452fddddb99
Cr-Commit-Position: refs/heads/master@{#34745}

Powered by Google App Engine
This is Rietveld 408576698