Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zstd: Load source value at start of loop (#794)
There were four places were this value was loaded: before the loop, at the end, and before two continues. Doing it at the start reduces the code size. It also seems to give a tiny speedup: name old speed new speed delta Encoder_EncodeAllSimple/best-8 16.8MB/s ± 2% 16.9MB/s ± 1% +0.47% (p=0.025 n=8+10) Encoder_EncodeAllSimple4K/best-8 16.0MB/s ± 2% 16.2MB/s ± 1% +1.67% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Encoder_EncodeAllSimple/best-8 19.0B ± 5% 18.0B ± 0% -5.26% (p=0.002 n=9+9) Encoder_EncodeAllSimple4K/best-8 1.00B ± 0% 1.00B ± 0% ~ (all equal)
- Loading branch information