Closed mirekdlugosz closed 4 years ago
Looks like a V8 perf regression. cc @nodejs/v8
This might be related to right trimming? cc @mlippautz
Yes, it's right trimming related.
(Right trimming infrastructure did change though only recently for concurrent marking and even then it just manual copy vs memcopy.)
@nodejs/v8 Anything that can be done here or should we just close it out? Is there a tracking issue on the v8 side perhaps?
This is still an issue in Node 10. I think we should make sure an issue is opened on the V8 side, with a standalone test case. Somebody wants to do that?
Still an issue in Node.js 11.1.0.
@mlippautz do we have any plans to address right trimming in the near future?
1) It's unclear whether the fast version was exercising a right trimming path? Can we figure that out? 2) If it is right trimming related then the regression has to be related to GC running during benchmarking because that's where the codepath changed. There's nothing we can do here as we have to perform atomic reads and writes.
@mlippautz @bmeurer @hashseed shall I open an issue on your bug tracker? I guess it's easier for you to further look into the differences here?
Given that none of the versions in question are supported any longer, closing.
Linux localhost.localdomain 4.13.5-200.fc26.x86_64 #1 SMP Thu Oct 5 16:53:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Reproducer script
Steps to reproduce
test.js
npm install tough-cookie
node test.js
on v4, v6 and v8.Expected results
Times for all tests are roughly the same OR descending in newer versions
Actual results
The last case (81920 semicolons) is completely blown up in v6 - it runs 400 times slower. The last case runs "only" 200 times slower in v8 (compared to v4), but v8 runs second-to-last case (65536 semicolons) hundred times slower than either v6 or v4.
Please note that this is not related to tough-cookie module - it's code stays the same across all versions of node used during test. Performance regression is somewhere in node code that tough-cookie uses.
That script was used as test for security issue related to regular expression parsing in tough-cookie, so I guess RE engine is good place to start investigation.