-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
lib: optimize priority queue #60039
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
lib: optimize priority queue #60039
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60039 +/- ##
==========================================
+ Coverage 88.43% 88.45% +0.01%
==========================================
Files 703 703
Lines 207805 207800 -5
Branches 40026 40022 -4
==========================================
+ Hits 183780 183801 +21
+ Misses 16012 15979 -33
- Partials 8013 8020 +7
🚀 New features to boost your workflow:
|
node/lib/internal/priority_queue.js Lines 28 to 32 in cff138c
This was dead code before, the check never worked Example coverage form another PR: https://app.codecov.io/gh/nodejs/node/pull/60060/blob/lib/internal/priority_queue.js?dropdown=coverage#L32 |
@aduh95 PTAL, it's actually faster without the manual array resizing in modern node (V8 does it anyway) So we just removed the dead code and made it packed (assigning to |
@BridgeAR you can run the priority queue benchmark again by the way This was faster for me locally |
Started a benchmark including the upcoming V8 update: https://github.com/aduh95/node/actions/runs/18221639411 EDIT: seems to be (significantly) faster across the board 🚀 |
Can you update the commit message? I don't think this has anything to do with coverage, instead you can use something like |
Done, originally the PR only removed the check that never worked, which did increase coverage, but then I added the perf improvement |
I need a rerun of macOS and an approval |
Landed in e978a63 |
PR-URL: #60039 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Further improves performance and fixes leftover issues from my last PR
Benchmarks:
main
branch