GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — process: improve performance of nextTick by evanlucas · Pull Request #8932 · nodejs/node Conversation
Contributor
Checklist
Affected core subsystem(s)process Description of changeThis replaces TickObject with an object literal. This offers Results from a few benchmark runs: /cc @trevnorris since you added TickObject
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just out of curiosity, is there a particular reason not to go ?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just find it less readable than the way it currently is.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer what @claudiorodriguez suggested
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ack
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. assuming it does not alter perf that is
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it doesn't appear to make a difference. Just ran again using shorthand and the numbers are more or less the same. :]
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Great work. Nice to see that you are using the new benchmarking tool. However you shouldn't do many independent For each comparison you do, there is by default a 5% risk that we see a significant result when there in reality no improvement. By doing 3 runs you increase that risk to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@AndreasMadsen thanks for the info. I ran the bench again once with 100 runs this time and got very similar results: Should I be doing these runs once for each benchmark script? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'd like to see some info on what branches this can effectively go to before we land it though :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Fishrock123 yea, am going to bench on v6.x now |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
(pending checks are a bug -- i need to cover skipped status) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
results for v6.x: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Not sure what you mean. But it looks like you did it correctly 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh, what I meant to say is LATM. Looks Awesome To Me. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Running CI one more time since I updated it: https://ci.nodejs.org/job/node-test-pull-request/4403/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM. Though we shouldn't put much on the breadth tests. 99% of the time the nextTickQueue array has fewer than 5 callbacks when processed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am going to benchmark on v4.x tonight to see if it is even worth it there as well. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So, for v4, I had to use the old benchmarks. It doesn't seem to make as much of a difference as on v6. so, we can probably just not backport this to v4.x |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
79c679d to
fc514fd
Compare
|
@evanlucas you are supposed to be able to use the new benchmarking suite on old node versions. The process is: git checkout upstream/v4.x-staging # or similar branch make -j8 cp ./node ./node-v4 apply-pr 8932 # fix the file missing conflict make -j8 cp ./node ./node-v4-pr8932 git checkout master make -j4 # or just use your globally installed version ./node ./benchmark/compare.js \ --old ./node-v4 --new ./node-v4-pr8932 \ --filter next-tick -- process | tee results.csv cat results.csv | Rscript ./benchmark/compare.R Unfortunately some new syntax has sneaked into common.js. Replacing This gives the result (30 runs): |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This replaces TickObject with an object literal. This offers performance improvements of up to ~20%. PR-URL: nodejs#8932 Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
fc514fd to
804d57d
Compare
|
Landed in 804d57d. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This replaces TickObject with an object literal. This offers performance improvements of up to ~20%. PR-URL: #8932 Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
Using new syntax such as `...args` means that the benchmark suite can't be used with older node versions. This changes the `...args` syntax to a good old `Array.prototype.slice`. Refs: #8932 (comment) PR-URL: #9064 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]>
Using new syntax such as `...args` means that the benchmark suite can't be used with older node versions. This changes the `...args` syntax to a good old `Array.prototype.slice`. Refs: #8932 (comment) PR-URL: #9064 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Brian White <[email protected]>
|
@evanlucas how long should we be letting this live on v7 before backporting? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It's a pretty small change so it doesn't really matter to me. I think it should be fine to get in to the next v6.x release if no one objects |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This does not land cleanly in LTS v4.x. Added dont-land label. Please feel free to manually backport |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This replaces TickObject with an object literal. This offers performance improvements of up to ~20%. PR-URL: #8932 Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
This replaces TickObject with an object literal. This offers performance improvements of up to ~20%. PR-URL: #8932 Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
|
Backport for v4.x can be found at #10433. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) #9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) #9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) #8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) #10103
- improved support for generator functions (Teddy Katz)
#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) #9685
PR-URL: #10394
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) #9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) #9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) #8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) #10103
- improved support for generator functions (Teddy Katz)
#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) #9685
PR-URL: #10394
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) nodejs/node#9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
nodejs/node#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
nodejs/node#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) nodejs/node#9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) nodejs/node#8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
nodejs/node#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) nodejs/node#10103
- improved support for generator functions (Teddy Katz)
nodejs/node#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) nodejs/node#9685
PR-URL: nodejs/node#10394
Signed-off-by: Ilkka Myller <[email protected]>
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) nodejs/node#9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
nodejs/node#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
nodejs/node#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) nodejs/node#9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) nodejs/node#8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
nodejs/node#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) nodejs/node#10103
- improved support for generator functions (Teddy Katz)
nodejs/node#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) nodejs/node#9685
PR-URL: nodejs/node#10394
Signed-off-by: Ilkka Myller <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.