Commit 5655ff2
committed
Optimize appendString: bulk array copy via String.getChars
Replace char-by-char appendUnsafeC loop with String.getChars bulk copy
directly into CharBuilder's backing array. This eliminates per-character
method call overhead and allows the JVM/native runtime to use optimized
memory copy intrinsics.
Upstream: He-Pin/sjsonnet@5e9686cd (appendString portion)1 parent 652bdf7 commit 5655ff2
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
182 | 185 | | |
183 | 186 | | |
184 | | - | |
185 | 187 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
0 commit comments