New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: backport 6d38f89d from upstream V8 #13162

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
7 participants
@ofrobots
Contributor

ofrobots commented May 23, 2017

This fixes some of the regressions in #12657. 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}

Checklist
  • make -j4 test (UNIX), or vcbuild 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/

@mscdex mscdex added the performance label May 23, 2017

@ofrobots ofrobots added this to the 8.0.0 milestone May 23, 2017

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel May 23, 2017

Member

cc @jasnell I think this is what we talked about today.

@ofrobots The 6.0 branch cut is happening on Thursday. Since this needs 2 day reviews anyways, we could probably just bump the version number?

Member

fhinkel commented May 23, 2017

cc @jasnell I think this is what we talked about today.

@ofrobots The 6.0 branch cut is happening on Thursday. Since this needs 2 day reviews anyways, we could probably just bump the version number?

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell May 23, 2017

Member

Yes. This definitely needs to land for 8.x.

Member

jasnell commented May 23, 2017

Yes. This definitely needs to land for 8.x.

@ofrobots

This comment has been minimized.

Show comment
Hide comment
@ofrobots

ofrobots May 23, 2017

Contributor

@fhinkel Okay, It might be safe enough to bump the version number for V8 5.8 but we will run into the same issue with 5.9. Regardless, I will add a bump for 5.8 to this PR and we can deal with 5.9 when we get there.

Contributor

ofrobots commented May 23, 2017

@fhinkel Okay, It might be safe enough to bump the version number for V8 5.8 but we will run into the same issue with 5.9. Regardless, I will add a bump for 5.8 to this PR and we can deal with 5.9 when we get there.

@fhinkel

LGTM once the version number is bumped (hoping it won't conflict with last minute 5.8 changes).

@jasnell

Rubber stamp LGTM

deps: backport 6d38f89d from upstream V8
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

    #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}

PR-URL: #13162
Reviewed-By: fhinkel - Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>

@richardlau richardlau referenced this pull request May 24, 2017

Closed

deps: cherry-pick 6803eef from V8 upstream #13175

0 of 4 tasks complete
@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax May 25, 2017

Member

Landed in e51a201

Member

addaleax commented May 25, 2017

Landed in e51a201

@addaleax addaleax closed this May 25, 2017

addaleax added a commit that referenced this pull request May 25, 2017

deps: backport 6d38f89d from upstream V8
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

    #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}

PR-URL: #13162
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

jasnell added a commit that referenced this pull request May 25, 2017

deps: backport 6d38f89d from upstream V8
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

    #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}

PR-URL: #13162
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

jasnell added a commit that referenced this pull request May 28, 2017

deps: backport 6d38f89d from upstream V8
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

    #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}

PR-URL: #13162
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

@jasnell jasnell referenced this pull request May 28, 2017

Closed

8.0.0 Release Proposal #12220

@gibfahn gibfahn referenced this pull request Jun 15, 2017

Closed

Auditing for 6.11.1 #230

2 of 3 tasks complete
@MylesBorins

This comment has been minimized.

Show comment
Hide comment
@MylesBorins

MylesBorins Jul 17, 2017

Member

@ofrobots safe to assume this is not to be landed on v6.x?

Member

MylesBorins commented Jul 17, 2017

@ofrobots safe to assume this is not to be landed on v6.x?

@ofrobots

This comment has been minimized.

Show comment
Hide comment
@ofrobots

ofrobots Jul 17, 2017

Contributor

Yep. This does not need to be back-ported to 6.x.

Contributor

ofrobots commented Jul 17, 2017

Yep. This does not need to be back-ported to 6.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment