-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
node22 performance degradation #52700
Comments
Maybe related to #51360 |
@nodejs/performance |
@FishOrBear What are you running this on? Your numbers appear to be very, very high. I do not see a regression. What I see on this test is that Node 20 had much better performance on this particular test, but it went away soon after. Here are my results on a macbook... Bun
Node 22
Node 21...
Node 20
Node 19
Node 18
Node 17
Node 16
Node 10
I think we need more tests to verify the issue. |
Unless there is something specific about buffers, this has nothing to do with Node.js, but it's rather a V8 change. |
I'm running it on an older cpu and your macbook performs well. |
The JavaScript engine v8 was updated to 11.3 with Node 20, it was upgraded again to 11.8 with Node 20. Node 19 had v8 10.7. Regarding the possibility that it could be #51360... maglev was introduced in Node 22, but you see a performance difference between Node 20 and Node 21. So my numbers do not point at a regression caused by maglev. |
Buffers are just Uint8Arrays now, so if this reproduces with Uint8Array, this is more likely an V8 issue (especially if it reproduces with different versions of d8) |
stay tuned |
I have updated the nodejs version to 22.9.0 and I will update the benchmark. nodejs20.17.0
nodejs.22.9.0
It is probably because nodejs has disabled Maglev in 22.9.0. |
Can you reproduce it with just Uint8Array? If it's also reproducible in different versions of d8 then it's probably a V8 bug. I'd say among different V8 versions some performance differences are to be expected, since they are always tweaking the architecture and also they optimize towards better macro-benchmark scores, not necessarily maintaining any numbers you could see in micro benchmarks like this because the former is more meaningful to real world applications. |
Version
22.0.0
Platform
Linux debian 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
When I increase the number of operations, due to the optimization of v8, the performance will be shortened to 23ms, but it is still worse than the previous 21ms performance.
How often does it reproduce? Is there a required condition?
node perf.js
What is the expected behavior? Why is that the expected behavior?
in nodejs 20.12.2
in nodejs 22.0.0
What do you see instead?
1
Additional information
1
The text was updated successfully, but these errors were encountered: