-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
src: improve utf8 string generation performance #54873
Conversation
36e1983
to
def9c45
Compare
def9c45
to
34b530b
Compare
Failed to start CI- Validating Jenkins credentials ✔ Jenkins credentials valid - Starting PR CI job ✘ Failed to start PR CI: 400 Bad Requesthttps://github.com/nodejs/node/actions/runs/10795045779 |
CI failures look relevant to this change. |
Oh no. |
Since the PR is claiming for performance, we should have benchmarks. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54873 +/- ##
==========================================
+ Coverage 88.05% 88.08% +0.02%
==========================================
Files 651 651
Lines 183405 183551 +146
Branches 35822 35867 +45
==========================================
+ Hits 161499 161676 +177
+ Misses 15159 15133 -26
+ Partials 6747 6742 -5
|
I don't know how to have an isolated benchmark for this. Any recommendations @RafaelGSS? |
So, how do you know this PR is improving performance then?
I suspect if you measure any public API that makes use of this new branch behind the scenes you should get a feasible result |
7556dc8
to
70263e8
Compare
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.
RSLGTM
@anonrig @RafaelGSS (By extra time, I meant days, not months.) |
70263e8
to
4a5bcdc
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Daniel Lemire <daniel@lemire.me>
4a5bcdc
to
435fa04
Compare
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
@ronag Can you review? |
Addressed the recommendation. Dismissing.
Landed in 8191e1f |
PR-URL: nodejs#54873 Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: nodejs#54873 Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
This speeds up Utf8Value across all Node.js codebase. We add a fast path for one byte strings and use the new V8 API (String::ValueView) with simdutf for non-byte strings. Once simdutf supports null termination and invalid character replacement, we can improve the performance more.
cc @nodejs/performance @lemire
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1637/