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

Issue 2874453002: [turbofan] Boost performance of Array.prototype.shift by 4x. (Closed)

Created:
3 years, 7 months ago by Benedikt Meurer
Modified:
3 years, 7 months ago
Reviewers:
Jarin
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Boost performance of Array.prototype.shift by 4x. For small arrays, it's way faster to just move the elements instead of doing the fairly complex and heavy-weight left-trimming. Crankshaft has had this optimization for small arrays already; this CL more or less ports this functionality to TurboFan, which yields a 4x speed-up when using shift on small arrays (with up to 16 elements). This should recover some of the regressions reported in the Node.js issues https://github.com/nodejs/node/issues/12657 and discovered for the syncthrough module using https://github.com/mcollina/syncthrough/blob/master/benchmarks/basic.js as benchmark. R=jarin@chromium.org BUG=v8:6376 Review-Url: https://codereview.chromium.org/2874453002 Cr-Commit-Position: refs/heads/master@{#45216} Committed: https://chromium.googlesource.com/v8/v8/+/6d38f89d262a05208002648489daa4ddce44020e

Patch Set 1 #

Patch Set 2 : Cosmetic fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -1 line) Patch
M src/compiler/graph.h View 1 chunk +11 lines, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.cc View 1 3 chunks +176 lines, -0 lines 0 comments Download
M src/crankshaft/hydrogen.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 chunk +3 lines, -0 lines 0 comments Download
A test/mjsunit/array-shift5.js View 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (11 generated)
Benedikt Meurer
Hey Jaro, Here's the A.p.shift fix for TurboFan. Please take a look. Thanks, Benedikt
3 years, 7 months ago (2017-05-10 04:58:31 UTC) #7
Jarin
lgtm
3 years, 7 months ago (2017-05-10 05:15:39 UTC) #8
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/2874453002/20001
3 years, 7 months ago (2017-05-10 05:46:39 UTC) #12
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 05:48:30 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/6d38f89d262a05208002648489daa4ddce4...

Powered by Google App Engine
This is Rietveld 408576698