Skip to content

NativeString: use ValueView for utf16 - #1265

Closed
ValoChet wants to merge 1 commit into
uNetworking:masterfrom
ValoChet:stringView
Closed

NativeString: use ValueView for utf16#1265
ValoChet wants to merge 1 commit into
uNetworking:masterfrom
ValoChet:stringView

Conversation

@ValoChet

Copy link
Copy Markdown
Contributor

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

@ValoChet

Copy link
Copy Markdown
Contributor Author

In the pool, the pool_offset seems to only go up?

@uNetworkingAB

Copy link
Copy Markdown
Contributor

Yes it only grows. But you have a new NativeStringContext for every set of NativeString so it "resets" for each function call.

@ValoChet
ValoChet marked this pull request as draft March 31, 2026 12:54
@ValoChet
ValoChet force-pushed the stringView branch 2 times, most recently from 2ebfbcf to d16be0f Compare April 2, 2026 12:29
@ValoChet
ValoChet marked this pull request as ready for review April 2, 2026 15:13
@ValoChet ValoChet closed this Apr 9, 2026
@ValoChet
ValoChet deleted the stringView branch April 9, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants