Skip to content

Use simdutf for faster string encoding/decoding#976

Open
wh201906 wants to merge 11 commits intomargelo:mainfrom
wh201906:wh201906/simdutf
Open

Use simdutf for faster string encoding/decoding#976
wh201906 wants to merge 11 commits intomargelo:mainfrom
wh201906:wh201906/simdutf

Conversation

@wh201906
Copy link
Copy Markdown

@wh201906 wh201906 commented Apr 6, 2026

This PR migrates some string encoding/decoding functions in HybridUtils from OpenSSL/manual implementations to simdutf:

These changes significantly improve performance when encoding/decoding large base64 payloads. I ran the benchmark on an old Android device and here are the results:
(I added some test cases with 1kB data, but this PR doesn't include them)
base64 1MB encode throughput compared with CraftzdogBuffer: From 4.92x to 9.16x
base64 1MB decode throughput compared with CraftzdogBuffer: From 169.07x to 398.76x

  • old
IMG_20260406_205200
  • new
IMG_20260406_220227

@wh201906
Copy link
Copy Markdown
Author

wh201906 commented Apr 6, 2026

There are some ongoing optimizations in simdutf, which can also be utilized in RNQC once implemented.
simdutf/simdutf#925
simdutf/simdutf#565

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.

1 participant