NativeString: use ValueView for utf16 - #1265
Closed
ValoChet wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
In the pool, the pool_offset seems to only go up? |
Contributor
|
Yes it only grows. But you have a new NativeStringContext for every set of NativeString so it "resets" for each function call. |
ValoChet
marked this pull request as draft
March 31, 2026 12:54
ValoChet
force-pushed
the
stringView
branch
2 times, most recently
from
April 2, 2026 12:29
2ebfbcf to
d16be0f
Compare
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.
It is even faster using ValueView + pool.
Benchmark summary:
binary: 161k Req/Sec
utf8copy: 155k Req/Sec
utf8copyV2: 157k Req/Sec
utf8copyV2+pool: 160k Req/Sec
utf8view: 162k Req/Sec
utf16copy: 149k Req/Sec
utf16copyV2: 153k Req/Sec
utf16copyV2+pool: 158k Req/Sec
utf16view+pool: 160k Req/Sec