-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
buffer: implement native C++ fast-path for Buffer.concat #58409
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: implement native C++ fast-path for Buffer.concat #58409
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58409 +/- ##
==========================================
- Coverage 90.22% 90.18% -0.04%
==========================================
Files 633 635 +2
Lines 187027 187226 +199
Branches 36720 36758 +38
==========================================
+ Hits 168746 168853 +107
- Misses 11083 11139 +56
- Partials 7198 7234 +36
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The benchmark result seems to be a huge regression?
This comment was marked as resolved.
This comment was marked as resolved.
Oh wait, I misread, this isn't using fast APIs.. |
I will investigate this in more detail |
Triggered benchmark ci: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1718/console |
seems slower, maybe it is the cost of context switching. Although I was also expecting a V8 fast api call by the description. |
Sometimes the turbofan opts are simply better, sometimes the perf gain is almost nothing by adding a fast-api call; V8 is very unpredictable. |
maybe I can make an improvement for Turbofan like you said here, but when I looked at it, I saw that it was already optimized. |
Thank you everyone for the review, I hope I can take this place to a better contribution in the future, I am closing this place |
added fast path for
Buffer.concat
node-main benchmark result: