Commit 24d3812
Avoid potentially unnecessary string reallocs.
In case `dest` is not created using a subset of the `input`
`dest.reserve(input.size())` would result in increasing `dest`s
size with likely reallocation. On top of being less efficient
new version also generates significantly less asm with GCC 13.
https://compiler-explorer.com/z/x3avEdWGM1 parent a9c1c4d commit 24d3812
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
| 388 | + | |
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
| |||
0 commit comments