mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Add decode_huffman_fast.
It's not fast yet, and the immediate impact is indeed a significant performance loss, but follow-up commits should make it faster. name old speed new speed delta puffs_adler32_10k/clang 2.41GB/s ± 0% 2.40GB/s ± 1% ~ (p=0.222 n=5+5) puffs_adler32_100k/clang 2.41GB/s ± 1% 2.39GB/s ± 1% -0.97% (p=0.016 n=5+5) puffs_flate_decode_1k/clang 116MB/s ± 5% 115MB/s ± 0% ~ (p=0.310 n=5+5) puffs_flate_decode_10k/clang 145MB/s ± 0% 139MB/s ± 0% -4.18% (p=0.016 n=4+5) puffs_flate_decode_100k/clang 164MB/s ± 5% 158MB/s ± 1% ~ (p=0.151 n=5+5) puffs_zlib_decode_10k/clang 135MB/s ± 2% 131MB/s ± 0% -2.84% (p=0.008 n=5+5) puffs_zlib_decode_100k/clang 154MB/s ± 1% 148MB/s ± 2% -4.09% (p=0.016 n=4+5) puffs_adler32_10k/gcc 3.13GB/s ± 4% 3.19GB/s ± 0% +1.94% (p=0.032 n=5+5) puffs_adler32_100k/gcc 3.14GB/s ± 3% 3.20GB/s ± 3% ~ (p=0.056 n=5+5) puffs_flate_decode_1k/gcc 122MB/s ± 1% 94MB/s ± 1% -22.84% (p=0.008 n=5+5) puffs_flate_decode_10k/gcc 143MB/s ± 0% 110MB/s ± 0% -23.24% (p=0.008 n=5+5) puffs_flate_decode_100k/gcc 158MB/s ± 0% 118MB/s ± 0% -24.98% (p=0.008 n=5+5) puffs_zlib_decode_10k/gcc 136MB/s ± 0% 119MB/s ± 1% -12.63% (p=0.008 n=5+5) puffs_zlib_decode_100k/gcc 150MB/s ± 1% 124MB/s ± 2% -17.17% (p=0.008 n=5+5)
This commit is contained in:
1 parent
c550ad9bda
commit
aa1f0078db
8 files changed
+753
-2
No files matched your search
@@ -13,6 +13,11 @@
|
||||
// limitations under the License.
|
||||
|
||||
pri func flate_decoder.decode_huffman_slow?(dst writer1, src reader1)() {
|
||||
// When editing this function, consider making the equivalent change to the
|
||||
// decode_huffman_fast function. Keep the diff between the two
|
||||
// decode_huffman_*.puffs files as small as possible, while retaining both
|
||||
// correctness and performance.
|
||||
|
||||
var bits u32 = this.bits
|
||||
var n_bits u32 = this.n_bits
|
||||
|
||||
|
||||
Reference in new issue
Block a user