lib: make queueMicrotask faster by apapirovski · Pull Request #27032 · nodejs/node (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation9 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Accessing symbols is generally quite expensive and so is emitInit, only do both when actually required.
No longer create an additional scope within queueMicrotask in order to improve performance.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice 👍
apapirovski changed the title
make queueMicrotask faster lib: make queueMicrotask faster
Benchmark (job 313) results:
16:03:39 confidence improvement accuracy (*) (**) (***)
16:03:39 process/queue-microtask-breadth.js n=400000 *** 7.53 % ±1.34% ±1.76% ±2.27%
16:03:39 process/queue-microtask-depth.js n=1200000 -0.63 % ±1.48% ±1.95% ±2.51%
Don't forget to run test/benchmark/test-benchmark-process.js
with these changes.
BridgeAR added the author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Don't forget to run test/benchmark/test-benchmark-process.js with these changes.
The test will continue to pass.
This was referenced
Apr 2, 2019
danbev pushed a commit that referenced this pull request
Accessing symbols is generally quite expensive and so is emitInit, only do both when actually required.
PR-URL: #27032 Reviewed-By: Gus Caplan me@gus.host Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Reviewed-By: James M Snell jasnell@gmail.com
danbev pushed a commit that referenced this pull request
No longer create an additional scope within queueMicrotask in order to improve performance.
PR-URL: #27032 Reviewed-By: Gus Caplan me@gus.host Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Reviewed-By: James M Snell jasnell@gmail.com
This was referenced
Apr 23, 2019
This was referenced
Apr 23, 2019
Labels
Issues and PRs related to the async hooks subsystem.
PRs that have at least one approval, no pending requests for changes, and a CI started.
Issues and PRs related to the process subsystem.