-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
significant performance degradation with v7.x #11923
Comments
Just briefly looking over the code and judging by the profiler output, it looks like the extensive use of I also see a lot of deopts happening when running the benchmarks. |
More likely that V8 in Node 7 does not handle deep recursion as well as past versions. Repro:
|
I can see performance regression with jshttp/etag benchmark too : https://github.com/jshttp/etag Node 7.7.3 : ~380k req/s |
TurboFan helps somewhat:
but still significantly slower than Node 0.10.x, 0.12.x, 4.x, 5.x |
/cc @nodejs/v8 |
I see that too. It's written in a dispatch-y style that doesn't cater to V8's strengths. I think the difference between versions can be explained by V8 implementing ES6 semantics more closely. A lot of CPU time is spent in |
Can someone advise whether these are temporary performance degradations while ES6 support is added or whether these are more or less permanent degradations to performance due to new features being added to the language? This is the kind of feedback we need to push into the standards process. If permanent, more of these kinds of changes should be pushed back against. |
Can Google V8 maintainers take a look at this and suggest v8 options that bring performance back to the Node 4.x level? Uglify is 100% CPU bound and would benefit from unconditionally generating machine code at startup and never deoptimizing as v8 once did. |
@mscdex ... is it just me or has |
That seems interesting. |
Thanks for the benchmarks! Can you check the performance with Node.js master or even better, with v8 master? Here's a today's binary (works on ubuntu or build yourself). |
Ah, @bmeurer beat me to it 😄 . Is the optimization still relying on nothing setting the symbol? |
@fhinkel No that optimization was invalid, thanks to ES2015 proxies... ES2015 made it really challenging to have fast general case |
@bmeurer We float v8/v8@08377af to mitigate #9634. Should we revert that? (EDIT: Or perhaps I misunderstood your comment?) |
@bnoordhuis That would make it even worse. |
Not exactly sure what's up with Node v7, but current Node LKGR (Mar 20th) with Ignition+TurboFan definitely beats v4, 11.825s vs. 12.553s. Even w/ CS+FCG via
|
@bnoordhuis Oh, I think it might be because Node v7 is missing crbug.com/2511223003 and the follow-up fixes for |
@bnoordhuis @fhinkel ...looking at Node v7 with |
Yes, we had discussed that the turbofan commit was not a good candidate to be cherry-picked. |
On the bright side, node 8.0 ships with V8 5.7 and will have the fix. |
If this is just for v7.x, at this point in the cycle I think it is just best to swallow it if the backport seems iffy to do. |
I agree. I'll close this out. |
This benchmark seems like it might be a good candidate for https://benchmarking.nodejs.org/ |
@mhart can you open an issue in nodejs/benchmarking to suggest that ? |
mishoo/UglifyJS#1624 (comment)
mishoo/UglifyJS#1624 (comment)
Steps to reproduce:
git clone https://github.com/mishoo/UglifyJS2.git cd UglifyJS2 npm install node test/benchmark.js -mc warnings=false,passes=3
Timings for
math.js
The text was updated successfully, but these errors were encountered: