src: use validate_ascii_with_errors for buffer.isAscii#61122
Open
ChALkeR wants to merge 1 commit intonodejs:mainfrom
Open
src: use validate_ascii_with_errors for buffer.isAscii#61122ChALkeR wants to merge 1 commit intonodejs:mainfrom
ChALkeR wants to merge 1 commit intonodejs:mainfrom
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 89.73% 89.75% +0.01%
==========================================
Files 675 675
Lines 204648 204649 +1
Branches 39330 39326 -4
==========================================
+ Hits 183651 183681 +30
+ Misses 13282 13251 -31
- Partials 7715 7717 +2
🚀 New features to boost your workflow:
|
cjihrig
approved these changes
Dec 19, 2025
6 tasks
RafaelGSS
approved these changes
Jan 17, 2026
Collaborator
Collaborator
Collaborator
Collaborator
Member
|
Should we just merge this? I can't restart the macOS CI |
Collaborator
Collaborator
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 |
Member
Author
|
Jenkins CI was fine and didn't need to be restarted (but it apparently does now) |
Collaborator
Collaborator
Collaborator
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 |
Member
|
GitHub CI can't be restarted. I think it's too old. |
It has better performance
e78cdd1 to
f11c0ab
Compare
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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