mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +01:00
Reduce the deflate decoder Huffman table size
name old speed new speed delta wuffs_deflate_decode_1k/clang5 138MB/s ± 0% 140MB/s ± 1% +1.16% (p=0.008 n=5+5) wuffs_deflate_decode_10k/clang5 228MB/s ± 1% 229MB/s ± 1% ~ (p=0.222 n=5+5) wuffs_deflate_decode_100k_just_one_read/clang5 267MB/s ± 1% 267MB/s ± 1% ~ (p=0.690 n=5+5) wuffs_deflate_decode_100k_many_big_reads/clang5 225MB/s ± 0% 225MB/s ± 0% ~ (p=0.310 n=5+5) wuffs_deflate_decode_1k/gcc7 157MB/s ± 0% 157MB/s ± 0% ~ (p=0.730 n=4+5) wuffs_deflate_decode_10k/gcc7 269MB/s ± 0% 269MB/s ± 1% ~ (p=0.222 n=5+5) wuffs_deflate_decode_100k_just_one_read/gcc7 321MB/s ± 0% 321MB/s ± 1% ~ (p=0.548 n=5+5) wuffs_deflate_decode_100k_many_big_reads/gcc7 254MB/s ± 0% 254MB/s ± 0% ~ (p=0.421 n=5+5) wuffs_gzip_decode_10k/clang5 205MB/s ± 0% 212MB/s ± 0% +3.50% (p=0.016 n=5+4) wuffs_gzip_decode_100k/clang5 238MB/s ± 0% 245MB/s ± 0% +3.31% (p=0.008 n=5+5) wuffs_gzip_decode_10k/gcc7 247MB/s ± 0% 248MB/s ± 0% +0.47% (p=0.016 n=5+5) wuffs_gzip_decode_100k/gcc7 293MB/s ± 1% 293MB/s ± 0% ~ (p=0.690 n=5+5) wuffs_zlib_decode_10k/clang5 210MB/s ± 0% 210MB/s ± 0% ~ (p=0.056 n=5+5) wuffs_zlib_decode_100k/clang5 244MB/s ± 0% 244MB/s ± 0% ~ (p=0.556 n=4+5) wuffs_zlib_decode_10k/gcc7 247MB/s ± 0% 249MB/s ± 1% +0.77% (p=0.008 n=5+5) wuffs_zlib_decode_100k/gcc7 288MB/s ± 0% 288MB/s ± 0% ~ (p=1.000 n=5+5)
This commit is contained in:
1 parent
670b45be53
commit
92f3958a28
4 files changed
+16
-16
No files matched your search
@@ -82,7 +82,7 @@ pri func decoder.decode_huffman_slow?(dst base.io_writer, src base.io_reader) {
|
||||
if (redir_top + (bits & redir_mask)) >= huffs_table_size {
|
||||
return "?internal error: inconsistent Huffman decoder state"
|
||||
}
|
||||
assert (redir_top + (bits & redir_mask)) < 1234 via "a < b: a < c; c <= b"(c:huffs_table_size)
|
||||
assert (redir_top + (bits & redir_mask)) < 1024 via "a < b: a < c; c <= b"(c:huffs_table_size)
|
||||
table_entry = this.huffs[0][redir_top + (bits & redir_mask)]
|
||||
table_entry_n_bits = table_entry & 0x0F
|
||||
if n_bits >= table_entry_n_bits {
|
||||
@@ -164,7 +164,7 @@ pri func decoder.decode_huffman_slow?(dst base.io_writer, src base.io_reader) {
|
||||
if (redir_top + (bits & redir_mask)) >= huffs_table_size {
|
||||
return "?internal error: inconsistent Huffman decoder state"
|
||||
}
|
||||
assert (redir_top + (bits & redir_mask)) < 1234 via "a < b: a < c; c <= b"(c:huffs_table_size)
|
||||
assert (redir_top + (bits & redir_mask)) < 1024 via "a < b: a < c; c <= b"(c:huffs_table_size)
|
||||
table_entry = this.huffs[1][redir_top + (bits & redir_mask)]
|
||||
table_entry_n_bits = table_entry & 0x0F
|
||||
if n_bits >= table_entry_n_bits {
|
||||
|
||||
Reference in new issue
Block a user