Skip to content

Conversation

@apapirovski
Copy link
Contributor

@apapirovskiapapirovski commented Dec 4, 2017

Instead of callback bound apply, instead use the standard Reflect.apply. This is both safer and appears to offer a slight performance benefit. Perhaps due to not having to search the prototype tree? No clue tbh but I'm seeing 3-5% difference with substantial significance.

Refs: #12956

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

domain, events

@apapirovskiapapirovski added domain Issues and PRs related to the domain subsystem. events Issues and PRs related to the events subsystem / EventEmitter. labels Dec 4, 2017
@nodejs-github-botnodejs-github-bot added domain Issues and PRs related to the domain subsystem. events Issues and PRs related to the events subsystem / EventEmitter. labels Dec 4, 2017
@apapirovski
Copy link
ContributorAuthor

@BridgeAR
Copy link
Member

I would say this does not require 48 hours.

Instead of callback bound apply, instead use the standard Reflect.apply. This is both safer and appears to offer a slight performance benefit.
@apapirovskiapapirovskiforce-pushed the patch-events-reflect-apply branch from 73d2844 to 0587724CompareDecember 6, 2017 17:49
@apapirovski
Copy link
ContributorAuthor

apapirovski commented Dec 6, 2017

Missed a spot (+ rebased), have to run the CI again.

CI: https://ci.nodejs.org/job/node-test-pull-request/11916/

@apapirovski
Copy link
ContributorAuthor

Landed in f5eb803

@apapirovskiapapirovski deleted the patch-events-reflect-apply branch December 6, 2017 21:36
apapirovski added a commit that referenced this pull request Dec 6, 2017
Instead of callback bound apply, instead use the standard Reflect.apply. This is both safer and appears to offer a slight performance benefit. PR-URL: #17456 Refs: #12956 Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
@starkwangstarkwang mentioned this pull request Dec 7, 2017
2 tasks
@MylesBorins
Copy link
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

apapirovski added a commit to apapirovski/node that referenced this pull request Jan 31, 2018
Instead of callback bound apply, instead use the standard Reflect.apply. This is both safer and appears to offer a slight performance benefit. PR-URL: nodejs#17456 Refs: nodejs#12956 Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 20, 2018
Instead of callback bound apply, instead use the standard Reflect.apply. This is both safer and appears to offer a slight performance benefit. Backport-PR-URL: #18487 PR-URL: #17456 Refs: #12956 Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
@MylesBorins
Copy link
Contributor

Setting this as don't land for LTS, please let me know if this should be changed

@MylesBorinsMylesBorins mentioned this pull request Feb 21, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domainIssues and PRs related to the domain subsystem.eventsIssues and PRs related to the events subsystem / EventEmitter.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@apapirovski@BridgeAR@MylesBorins@jasnell@lpinca@TimothyGu@targos@cjihrig@nodejs-github-bot