src: move all 1-byte encodings to native #61118
Draft
+532
−164
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
This builds on top of #61093 and gives an additional ~2x improvement by moving the same logic to native
Warning
Very crude, just a concept demonstration at this point
The current native fast path removed in #61093 has a bunch of nested ifs and converts data from utf16 to utf8 and then back to utf16
This instead constructs strings using direct maps as #61093 and returns them as raw buffers
windows-1252, main:windows-1252, #61093:windows-1252, this PR:This also similarly improves all other 1-byte encodings compared to #61093
Only the second commit, first is #61093
Warning
Has a lot of cleanup to do, do mot merge, reviewing except for benchmarking / concept is pointless at this point
For comparison, Bun:
v8/jsc is not an issue, unoptimal code is
cc @nodejs/performance