Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zstd: Select best match using selection trees (#706)
* zstd: Select best match using selection trees name old speed new speed delta Encoder_EncodeAllSimple/best-8 12.2MB/s ± 1% 13.5MB/s ± 3% +10.55% (p=0.000 n=20+19) Encoder_EncodeAllSimple4K/best-8 10.5MB/s ± 1% 11.9MB/s ± 1% +13.52% (p=0.000 n=20+19) name old alloc/op new alloc/op delta Encoder_EncodeAllSimple/best-8 18.0B ± 0% 16.0B ± 0% -11.11% (p=0.000 n=18+17) Encoder_EncodeAllSimple4K/best-8 1.00B ± 0% 1.00B ± 0% ~ (all equal) * zstd: Track best match in best encoder by pointer As long as matchAt does not return a pointer, escape analysis determines that the matches can stay on the stack. This works in Go 1.17, too. name old speed new speed delta Encoder_EncodeAllSimple/best-8 13.5MB/s ± 3% 15.3MB/s ± 2% +13.35% (p=0.000 n=19+19) Encoder_EncodeAllSimple4K/best-8 11.9MB/s ± 1% 12.9MB/s ± 0% +8.38% (p=0.000 n=19+17) name old alloc/op new alloc/op delta Encoder_EncodeAllSimple/best-8 16.0B ± 0% 14.0B ± 0% -12.50% (p=0.000 n=17+20) Encoder_EncodeAllSimple4K/best-8 1.00B ± 0% 1.00B ± 0% ~ (all equal)
- Loading branch information