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

apapirovski

@apapirovski

Accessing symbols is generally quite expensive and so is emitInit, only do both when actually required.

@apapirovski

No longer create an additional scope within queueMicrotask in order to improve performance.

@nodejs-github-bot

devsnek

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice 👍

@apapirovski apapirovski changed the titlemake queueMicrotask faster lib: make queueMicrotask faster

Mar 31, 2019

BridgeAR

@nodejs-github-bot

@nodejs-github-bot

@refack

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%

@Trott

Don't forget to run test/benchmark/test-benchmark-process.js with these changes.

@BridgeAR BridgeAR added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Apr 1, 2019

@BridgeAR

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

@nodejs-github-bot

jasnell

@danbev

danbev pushed a commit that referenced this pull request

Apr 5, 2019

@apapirovski @danbev

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

Apr 5, 2019

@apapirovski @danbev

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

async_hooks

Issues and PRs related to the async hooks subsystem.

author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

process

Issues and PRs related to the process subsystem.