-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
src: use validate_ascii_with_errors for buffer.isAscii #61122
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
base: main
Are you sure you want to change the base?
Conversation
1f3f083 to
e78cdd1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61122 +/- ##
==========================================
- Coverage 88.53% 88.52% -0.02%
==========================================
Files 703 703
Lines 208546 208547 +1
Branches 40217 40217
==========================================
- Hits 184634 184607 -27
- Misses 15926 15949 +23
- Partials 7986 7991 +5
🚀 New features to boost your workflow:
|
lemire
left a comment
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.
Thanks for the ping.
gurgunday
left a comment
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.
lgtm
|
Should we just merge this? I can't restart the macOS CI |
Commit Queue failed- Loading data for nodejs/node/pull/61122 ✔ Done loading data for nodejs/node/pull/61122 ----------------------------------- PR info ------------------------------------ Title src: use validate_ascii_with_errors for buffer.isAscii (#61122) Author Nikita Skovoroda <chalkerx@gmail.com> (@ChALkeR) Branch ChALkeR:chalker/ascii/is/0 -> nodejs:main Labels buffer, c++, author ready, needs-ci Commits 1 - src: use validate_ascii_with_errors instead of validate_ascii Committers 1 - Nikita Skovoroda <chalkerx@gmail.com> PR-URL: https://github.com/nodejs/node/pull/61122 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/61122 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 19 Dec 2025 09:36:22 GMT ✔ Approvals: 4 ✔ - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/61122#pullrequestreview-3599469348 ✔ - Daniel Lemire (@lemire): https://github.com/nodejs/node/pull/61122#pullrequestreview-3600703637 ✔ - Rafael Gonzaga (@RafaelGSS) (TSC): https://github.com/nodejs/node/pull/61122#pullrequestreview-3674328458 ✔ - Gürgün Dayıoğlu (@gurgunday): https://github.com/nodejs/node/pull/61122#pullrequestreview-3708188048 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2026-02-10T20:42:11Z: https://ci.nodejs.org/job/node-test-pull-request/71299/ - Querying data for job/node-test-pull-request/71299/ ✔ Build data downloaded - Querying failures of job/node-test-commit/85408/ ✔ Data downloaded ✘ 1 failure(s) on the last Jenkins CI run -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/21888296181 |
|
Jenkins CI was fine and didn't need to be restarted (but it apparently does now) |
Commit Queue failed- Loading data for nodejs/node/pull/61122 ✔ Done loading data for nodejs/node/pull/61122 ----------------------------------- PR info ------------------------------------ Title src: use validate_ascii_with_errors for buffer.isAscii (#61122) Author Nikita Skovoroda <chalkerx@gmail.com> (@ChALkeR) Branch ChALkeR:chalker/ascii/is/0 -> nodejs:main Labels buffer, c++, author ready, needs-ci Commits 1 - src: use validate_ascii_with_errors instead of validate_ascii Committers 1 - Nikita Skovoroda <chalkerx@gmail.com> PR-URL: https://github.com/nodejs/node/pull/61122 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/61122 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 19 Dec 2025 09:36:22 GMT ✔ Approvals: 4 ✔ - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/61122#pullrequestreview-3599469348 ✔ - Daniel Lemire (@lemire): https://github.com/nodejs/node/pull/61122#pullrequestreview-3600703637 ✔ - Rafael Gonzaga (@RafaelGSS) (TSC): https://github.com/nodejs/node/pull/61122#pullrequestreview-3674328458 ✔ - Gürgün Dayıoğlu (@gurgunday): https://github.com/nodejs/node/pull/61122#pullrequestreview-3708188048 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2026-02-11T03:43:31Z: https://ci.nodejs.org/job/node-test-pull-request/71303/ - Querying data for job/node-test-pull-request/71303/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/21898227534 |
mertcanaltin
left a comment
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.
LGTM
|
GitHub CI can't be restarted. I think it's too old. |
It has better performance
e78cdd1 to
f11c0ab
Compare
Tracking: #61041
Don't expect
buffer.isAsciicommon-case to be ASCII, as that's exposed as a public API for checks.The error version has better performance on non-ascii as it returns early, which could easily be e.g. >10x.
Refs: #46271 (comment),
But somehow the
_errorsversion is also faster on ASCII, which was supposed to be a common case forvalidate_ascii?I'm not sure what's up, might be a simdutf bug? cc @lemire
On another note: v8 is also likely using
validate_asciiincorrectlybuffer.isAsciiperf:main:
PR