Skip to content

avoid duplicate buffer copy#2

Merged
friendlymatthew merged 1 commit into
mainfrom
avoid-buffer-copy
Mar 26, 2026
Merged

avoid duplicate buffer copy#2
friendlymatthew merged 1 commit into
mainfrom
avoid-buffer-copy

Conversation

@friendlymatthew
Copy link
Copy Markdown
Owner

to_vec and _platform_memmove took 17% of decode time. The decoder copies the input buffer twice, once for SIMD padding and once for caching.

This PR combines both into a single copy by writing directly into cached_buf, padding for the SIMD pipeline, then truncating back to the original length before field extraction

"no benchmark because I'm running other benchmarks atm"

Screenshot 2026-03-26 at 5 47 55 PM

@friendlymatthew friendlymatthew merged commit 9d8e336 into main Mar 26, 2026
3 checks passed
@friendlymatthew
Copy link
Copy Markdown
Owner Author

Screenshot 2026-03-26 at 5 53 00 PM

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