-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
src: improve StringBytes::Encode perf on ASCII #61119
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
0bfc0ec to
4f82c5a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61119 +/- ##
==========================================
- Coverage 88.53% 88.53% -0.01%
==========================================
Files 703 703
Lines 208546 208555 +9
Branches 40217 40215 -2
==========================================
+ Hits 184634 184638 +4
+ Misses 15926 15923 -3
- Partials 7986 7994 +8
🚀 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.
This looks good to me. It is simple, likely quite safe.
4f82c5a to
866781f
Compare
|
Upd: removed useless |
|
@lemire I notice that Why is that and is there a reason to prefer the latter? Upd, ah: #46271 (comment), updated PR |
mcollina
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
Failed to start CI⚠ Commits were pushed since the last approving review: ⚠ - src: improve StringBytes::Encode perf on ASCII ⚠ - src: use validate_ascii_with_errors ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/20370786084 |
mcollina
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
Tracking: #61041
This significantly improves both utf8
TextDecoderandBuffer#toString()performance on ASCIIAnd removes the main reason why
import { TextDecoder } from '@exodus/bytes/encoding.js'beats both Node.js TextDecoder and Node.js Buffer on Node.js on utf-8 🙃See #61041 (comment)
Using https://github.com/lemire/jstextdecoderbench by @lemire:
Buffer#toString() - utf8
main:
PR:
TextDecoder, loose
main:
PR:
TextDecoder, fatal
main:
PR:
cc @nodejs/performance