-
Notifications
You must be signed in to change notification settings - Fork 31.3k
timers: optimize timer functions with improved argument handling #57072
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dc9268b
to
054659b
Compare
However, I recommend merging this version with the latest commit (5bf7e26) to not have holey arrays and for consistency gurgunday@Gurguns-MacBook-Air node % ./out/Release/node benchmark/run.js timers
timers/immediate.js
timers/immediate.js type="depth" n=5000000: 80,468.347887105
timers/immediate.js type="depth1" n=5000000: 80,273.09887569316
timers/immediate.js type="breadth" n=5000000: 5,866,096.091053544
timers/immediate.js type="breadth1" n=5000000: 3,582,319.354496545
timers/immediate.js type="breadth4" n=5000000: 3,268,553.8642968345
timers/immediate.js type="clear" n=5000000: 18,280,959.14708357
timers/set-immediate-breadth-args.js
timers/set-immediate-breadth-args.js n=5000000: 3,078,123.9392592525
timers/set-immediate-breadth.js
timers/set-immediate-breadth.js n=10000000: 5,286,463.315563438
timers/set-immediate-depth-args.js
timers/set-immediate-depth-args.js n=5000000: 79,877.45100246496
timers/timers-breadth-args.js
timers/timers-breadth-args.js n=1000000: 2,770,819.9410369517
timers/timers-breadth.js
timers/timers-breadth.js n=5000000: 4,216,864.783787456
timers/timers-cancel-pooled.js
timers/timers-cancel-pooled.js n=5000000: 29,206,432.148907755
timers/timers-cancel-unpooled.js
timers/timers-cancel-unpooled.js direction="start" n=1000000: 4,021,420.094131391
timers/timers-cancel-unpooled.js direction="end" n=1000000: 23,927,666.663675707
timers/timers-depth.js
timers/timers-depth.js n=1000: 877.6599768611793
timers/timers-insert-pooled.js
timers/timers-insert-pooled.js n=5000000: 2,833,107.3812150676
timers/timers-insert-unpooled.js
timers/timers-insert-unpooled.js direction="start" n=1000000: 3,502,887.6930419514
timers/timers-insert-unpooled.js direction="end" n=1000000: 2,340,635.853484566
timers/timers-timeout-nexttick.js
timers/timers-timeout-nexttick.js n=50000: 2,621,409.534003561
timers/timers-timeout-nexttick.js n=5000000: 6,167,875.059683906
timers/timers-timeout-pooled.js
timers/timers-timeout-pooled.js n=10000000: 19,414,833.68972917
timers/timers-timeout-unpooled.js
timers/timers-timeout-unpooled.js n=1000000: 16,475,878.465418886 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57072 +/- ##
==========================================
+ Coverage 90.26% 90.27% +0.01%
==========================================
Files 630 630
Lines 184634 184560 -74
Branches 36137 36111 -26
==========================================
- Hits 166654 166606 -48
- Misses 11022 11023 +1
+ Partials 6958 6931 -27
🚀 New features to boost your workflow:
|
|
Commit Queue failed- Loading data for nodejs/node/pull/57072 ✔ Done loading data for nodejs/node/pull/57072 ----------------------------------- PR info ------------------------------------ Title timers: optimize timer functions with improved argument handling (#57072) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch gurgunday:timers-preallocate -> nodejs:main Labels timers, needs-ci, needs-benchmark-ci, commit-queue-squash Commits 5 - timers: optimize timer functions with improved argument handling - avoid holey arrays - remove unused import - remove unused import - jsdoc too Committers 1 - Gürgün Dayıoğlu <hey@gurgun.day> PR-URL: https://github.com/nodejs/node/pull/57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> -------------------------------------------------------------------------------- ℹ This PR was created on Sat, 15 Feb 2025 17:25:50 GMT ✔ Approvals: 4 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/57072#pullrequestreview-2619477349 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/57072#pullrequestreview-2619481862 ✔ - Ruben Bridgewater (@BridgeAR) (TSC): https://github.com/nodejs/node/pull/57072#pullrequestreview-2619492113 ✔ - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/57072#pullrequestreview-2625769474 ✔ Last GitHub CI successful ✘ No full Jenkins CI runs detected ℹ Last Benchmark CI on 2025-02-23T19:48:20Z: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1659/ - Querying data for job/node-test-pull-request/1659/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/13486630589 |
This comment was marked as outdated.
This comment was marked as outdated.
e2429c1
to
703dedd
Compare
@atlowChemi can we try again? This shouldn't fail normally |
This comment was marked as outdated.
This comment was marked as outdated.
Benchmark CI including latest changes: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1668/
|
@lpinca can you take a look if you have time? |
Landed in 1123585 |
PR-URL: #57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #57072 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
After:
Before: