Commit 9d8e336
authored
avoid duplicate buffer copy (#2)
`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"
<img width="1509" height="375" alt="Screenshot 2026-03-26 at 5 47 55 PM"
src="https://github.com/user-attachments/assets/ccd84add-1902-4280-a1a0-37974b504be5"
/>1 parent e2e9afe commit 9d8e336
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
122 | | - | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
0 commit comments