Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zstd: Improve throughput of SpeedBestCompression encoder (#699)
Lifted ofCode and mlCode computations out of match.estBits, so that method will be inlined into its only caller. Also some changes to eliminate a branch: the last if block becomes two CMOVs/CSELs on amd64 and arm64. ``` name old speed new speed delta Encoder_EncodeAllSimple/best-8 11.1MB/s ± 1% 16.9MB/s ± 1% +52.23% (p=0.000 n=10+10) Encoder_EncodeAllSimple4K/best-8 8.41MB/s ± 1% 10.95MB/s ± 0% +30.20% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Encoder_EncodeAllSimple/best-8 20.0B ± 0% 18.0B ± 0% -10.00% (p=0.002 n=8+10) Encoder_EncodeAllSimple4K/best-8 2.00B ± 0% 2.00B ± 0% ~ (all equal) ```
- Loading branch information