Commit de1914a
committed
Avoid an unnecessary use of
I don't know why `SmallStr` was used here; some ad hoc profiling showed
this code is not that hot, the string is usually empty, and when it's
not empty it's usually very short. However, the use of a
`SmallStr<1024>` does result in 1024 byte `memcpy` call on each
execution, which shows up when I do `memcpy` profiling. So using a
normal string makes the code both simpler and very slightly faster.SmallStr.1 parent 45fcd1d commit de1914a
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
481 | 480 | | |
482 | 481 | | |
483 | 482 | | |
484 | | - | |
485 | | - | |
| 483 | + | |
| 484 | + | |
486 | 485 | | |
487 | 486 | | |
488 | 487 | | |
| |||
0 commit comments