deps: backport 6d38f89d from upstream V8
This fixes some of the regressions in #12657 (closed). Since upstream doesn't backport things other than bug / security fixes, we will have to float this patch on Node.js 8.x until V8 6.0 lands on master
.
One problem here is that since 5.8 and 5.9 are still stable/beta, we cannot bump the V8 version number in our copy of V8. This might make reasoning about precise versions between us and upstream a bit tricky. (/cc @targos).
The fixup needed for the backport to V8 5.8 were fairly minimal.
Original commit message:
[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 (closed)}
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
deps:v8
/cc @nodejs/v8 @bmeurer
EDIT: CI: https://ci.nodejs.org/job/node-test-pull-request/8242/ V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/710/