-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Buffer performance degradation in 6.6.0 #8733
Comments
I’ll look into this. I assume the overhead comes from the explicit call into C++, so it trades of correctness for performance; I guess this particular case could be easily improved with an |
Adds benchmarks for `Buffer.from()` and its various argument combinations. Ref: nodejs#8733
Benchmark PR for |
I threw up a branch w/ a commit that should gain back that performance issue: trevnorris@e555b5a not putting that in a PR just yet because it doesn't fix the actual problem. was just able to find performance elsewhere that was lying around. |
btw, #8739 touches the same code, so you may want to comment there too, once you know more? |
fix is in #8754 I think? |
No, that is a distinct performance regression –#8754 fixes a performance regression that comes with the V8 5.4 upgrade, nothing that’s released yet. |
Is this still an issue? |
I'm going to go ahead and close given the lack of any updates or movement in over a year. |
When comparing 6.6.0 against 6.5.0 using one of our benchmarks, we’ve noticed that there’s a performance degradation in the buffer code. We’re running a benchmark that creates a new buffer from an array as many times as it can over a given period of time, for example -
On 6.6.0 there an approx 10% slowdown over 6.5.0. Been working through the likely reasons with @gareth-ellis and found that this appears to have been caused by PR #8453 where in buffer.js instances of
if (value instanceof ArrayBuffer)
have been changed to
if (isArrayBuffer(value))
We saw this regression on Linux PPC64, however, if we back this change out of 6.6.0 and rebuild on both Linux PPC64 and Linux Intel, then we see a performance increase, suggesting that the change is having an adverse affect on buffer performance.
The text was updated successfully, but these errors were encountered: