Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flate: Improve huffman generation speed ~5-10% faster (#490)
Mainly gains for small blocks & fastest levels. ``` benchmark old ns/op new ns/op delta BenchmarkEncodeDigitsConstant1e4-32 16080 15984 -0.60% BenchmarkEncodeDigitsSpeed1e4-32 48105 45890 -4.60% BenchmarkEncodeDigitsDefault1e4-32 114016 111234 -2.44% BenchmarkEncodeDigitsCompress1e4-32 228570 225041 -1.54% BenchmarkEncodeDigitsSL1e4-32 46695 45006 -3.62% BenchmarkEncodeTwainConstant1e4-32 23557 22033 -6.47% BenchmarkEncodeTwainSpeed1e4-32 68594 63177 -7.90% BenchmarkEncodeTwainDefault1e4-32 112498 111798 -0.62% BenchmarkEncodeTwainCompress1e4-32 282909 274804 -2.86% BenchmarkEncodeTwainSL1e4-32 68406 62362 -8.84% benchmark old MB/s new MB/s speedup BenchmarkEncodeDigitsConstant1e4-32 621.89 625.64 1.01x BenchmarkEncodeDigitsSpeed1e4-32 207.88 217.91 1.05x BenchmarkEncodeDigitsDefault1e4-32 87.71 89.90 1.02x BenchmarkEncodeDigitsCompress1e4-32 43.75 44.44 1.02x BenchmarkEncodeDigitsSL1e4-32 214.16 222.19 1.04x BenchmarkEncodeTwainConstant1e4-32 424.51 453.87 1.07x BenchmarkEncodeTwainSpeed1e4-32 145.79 158.29 1.09x BenchmarkEncodeTwainDefault1e4-32 88.89 89.45 1.01x BenchmarkEncodeTwainCompress1e4-32 35.35 36.39 1.03x BenchmarkEncodeTwainSL1e4-32 146.19 160.35 1.10x ``` (output is byte exact)
- Loading branch information