Remove some redundant decode_huffman_xxx code.

name                           old speed      new speed      delta

puffs_adler32_10k/clang        2.40GB/s ± 1%  2.45GB/s ± 0%  +2.08%  (p=0.008 n=5+5)
puffs_adler32_100k/clang       2.41GB/s ± 1%  2.45GB/s ± 0%  +1.54%  (p=0.008 n=5+5)
puffs_flate_decode_1k/clang     140MB/s ± 0%   142MB/s ± 0%  +1.64%  (p=0.016 n=4+5)
puffs_flate_decode_10k/clang    186MB/s ± 1%   190MB/s ± 0%  +2.32%  (p=0.008 n=5+5)
puffs_flate_decode_100k/clang   209MB/s ± 1%   225MB/s ± 0%  +7.60%  (p=0.008 n=5+5)
puffs_zlib_decode_10k/clang     173MB/s ± 1%   176MB/s ± 0%  +2.04%  (p=0.008 n=5+5)
puffs_zlib_decode_100k/clang    193MB/s ± 0%   207MB/s ± 1%  +7.43%  (p=0.008 n=5+5)

puffs_adler32_10k/gcc          3.26GB/s ± 0%  3.21GB/s ± 1%  -1.48%  (p=0.008 n=5+5)
puffs_adler32_100k/gcc         3.25GB/s ± 0%  3.21GB/s ± 2%  -1.24%  (p=0.008 n=5+5)
puffs_flate_decode_1k/gcc       142MB/s ± 0%   139MB/s ± 1%  -2.27%  (p=0.008 n=5+5)
puffs_flate_decode_10k/gcc      232MB/s ± 1%   232MB/s ± 0%    ~     (p=0.548 n=5+5)
puffs_flate_decode_100k/gcc     259MB/s ± 2%   257MB/s ± 1%    ~     (p=0.151 n=5+5)
puffs_zlib_decode_10k/gcc       216MB/s ± 2%   215MB/s ± 1%    ~     (p=0.222 n=5+5)
puffs_zlib_decode_100k/gcc      241MB/s ± 1%   235MB/s ± 1%  -2.50%  (p=0.008 n=5+5)
This commit is contained in:
Nigel Tao committed 2017-11-08 17:08:36 +11:00
1 parent becd1a6b25
commit 989614df88
3 files changed
-20

No files matched your search

-5
View File
@@ -218,11 +218,6 @@ pri func flate_decoder.decode_huffman_fast?(dst writer1, src reader1)() {
table_entry_n_bits = table_entry & 0x0F
bits >>= table_entry_n_bits
n_bits -= table_entry_n_bits
// TODO: redundant?
if (table_entry >> 31) != 0 {
return error "internal error: inconsistent Huffman decoder state"
}
} else {
assert in.src.available() >= 2
}
-5
View File
@@ -145,11 +145,6 @@ pri func flate_decoder.decode_huffman_slow?(dst writer1, src reader1)() {
bits |= (in.src.read_u8?() as u32) << n_bits
n_bits += 8
}
// TODO: redundant?
if (table_entry >> 31) != 0 {
return error "internal error: inconsistent Huffman decoder state"
}
}
// For H-D, all symbols should be base number + extra bits.