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

Issue 2916063002: [turbofan] Optimize Function.prototype.bind for the common case. (Closed)

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

Description

[turbofan] Optimize Function.prototype.bind for the common case. When the input to Function.prototype.bind is a known function, we can inline the allocation of the JSBoundFunction into TurboFan, which provides a 2x speed-up for several hot functions in Node streams (as discovered by Matteo Collina). One of example of this can be found in https://github.com/nodejs/node/pull/13322, which can be optimized and made more readable using bind instead of closures. R=jarin@chromium.org Review-Url: https://codereview.chromium.org/2916063002 Cr-Commit-Position: refs/heads/master@{#45679} Committed: https://chromium.googlesource.com/v8/v8/+/3028f8075ec713d99ee4c5f419c7403cca14b446

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -0 lines) Patch
M src/compiler/access-builder.h View 1 chunk +9 lines, -0 lines 0 comments Download
M src/compiler/access-builder.cc View 1 1 chunk +29 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 2 chunks +110 lines, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.h View 1 chunk +1 line, -0 lines 0 comments Download
A test/mjsunit/compiler/function-bind.js View 1 chunk +77 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (11 generated)
Benedikt Meurer
3 years, 6 months ago (2017-06-01 12:02:45 UTC) #1
Benedikt Meurer
Hey Jaro, Here's something that Matteo pointed me too, where bind optimizations can help to ...
3 years, 6 months ago (2017-06-01 12:03:46 UTC) #4
Jarin
lgtm https://codereview.chromium.org/2916063002/diff/1/src/compiler/js-builtin-reducer.cc File src/compiler/js-builtin-reducer.cc (right): https://codereview.chromium.org/2916063002/diff/1/src/compiler/js-builtin-reducer.cc#newcode1261 src/compiler/js-builtin-reducer.cc:1261: : NodeProperties::GetValueInput(node, 2); Please describe in a comment ...
3 years, 6 months ago (2017-06-02 08:07:42 UTC) #7
Benedikt Meurer
https://codereview.chromium.org/2916063002/diff/1/src/compiler/js-builtin-reducer.cc File src/compiler/js-builtin-reducer.cc (right): https://codereview.chromium.org/2916063002/diff/1/src/compiler/js-builtin-reducer.cc#newcode1261 src/compiler/js-builtin-reducer.cc:1261: : NodeProperties::GetValueInput(node, 2); On 2017/06/02 08:07:42, Jarin wrote: > ...
3 years, 6 months ago (2017-06-02 11:58:43 UTC) #10
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/2916063002/20001
3 years, 6 months ago (2017-06-02 11:58:53 UTC) #14
commit-bot: I haz the power
3 years, 6 months ago (2017-06-02 12:30:12 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/3028f8075ec713d99ee4c5f419c7403cca1...

Powered by Google App Engine
This is Rietveld 408576698