-
Notifications
You must be signed in to change notification settings - Fork 41
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
Performance regression in Node.js v14 #47
Comments
@puzpuzpuz I think it's a regression in core. v12:
v14:
|
@ronag do you know what could have slown down https://github.com/mcollina/sonic-boom/blob/63bc3a4024c17302c7b0d4d3d0ca2ee0f2e772a9/bench.js#L55-L60 so much in v14? |
Yes, it looks a lot like a core-side regression. I'm going to profile the benchmark tomorrow and try to find the bottleneck in v14. |
How does it look if you try with node 15? |
same |
Yea, we would need to do a bisect. |
@mcollina @ronag |
There are so many suspects there, it'll take a while :/. |
I've tried profiling the benchmark on 14.4.0 and 14.5.0 and noticed one strange thing. In 14.5.0 |
I can't really see anything suspicious in the change log for 14.5. At least not related to streams or fs. |
removing flatstr does not change the bench |
Hmm, then it's something else. |
I'm currently bisect, let's see where I land. |
It's the V8 update
|
So, it's something in V8 after all. |
I'm not set up to bisect V8 :/ |
In the profiler output I also noticed the following. 14.4.0:
14.5.0:
Notice the 1965 ticks (36.3%) spent in GC in 14.5.0. So, I wonder if the regression may be related with this change in V8: https://v8.dev/blog/v8-release-83#faster-arraybuffer-tracking-in-the-garbage-collector |
That can definitely be it. However I'm a bit unclear where the ArrayBuffers are being allocated as this manipulates just strings. |
I was thinking of |
It is very suspicious and the source of the slowdown. |
I did a little bit of investigation on this. Apparently, the gc runs 4197 vs 5010 for the same number of iterations. In the v8 8.1 case, it does a few Mark&Sweep, while in the v8.3 it does not. |
See #46 (comment)
The text was updated successfully, but these errors were encountered: