Nigel Tao
545f043d94
Don't read extra bits if there's no extra bits.
...
name old speed new speed delta
puffs_adler32_10k/clang 2.45GB/s ± 0% 2.45GB/s ± 0% ~ (p=0.548 n=5+5)
puffs_adler32_100k/clang 2.45GB/s ± 0% 2.45GB/s ± 0% ~ (p=0.056 n=5+5)
puffs_flate_decode_1k/clang 142MB/s ± 0% 143MB/s ± 0% +0.63% (p=0.008 n=5+5)
puffs_flate_decode_10k/clang 190MB/s ± 0% 201MB/s ± 0% +5.54% (p=0.008 n=5+5)
puffs_flate_decode_100k/clang 225MB/s ± 0% 235MB/s ± 0% +4.27% (p=0.008 n=5+5)
puffs_zlib_decode_10k/clang 176MB/s ± 0% 186MB/s ± 0% +5.16% (p=0.008 n=5+5)
puffs_zlib_decode_100k/clang 207MB/s ± 1% 214MB/s ± 0% +3.56% (p=0.008 n=5+5)
puffs_adler32_10k/gcc 3.21GB/s ± 1% 3.26GB/s ± 0% +1.55% (p=0.008 n=5+5)
puffs_adler32_100k/gcc 3.21GB/s ± 2% 3.27GB/s ± 0% +1.66% (p=0.008 n=5+5)
puffs_flate_decode_1k/gcc 139MB/s ± 1% 146MB/s ± 0% +5.09% (p=0.008 n=5+5)
puffs_flate_decode_10k/gcc 232MB/s ± 0% 244MB/s ± 0% +5.42% (p=0.008 n=5+5)
puffs_flate_decode_100k/gcc 257MB/s ± 1% 280MB/s ± 0% +9.10% (p=0.008 n=5+5)
puffs_zlib_decode_10k/gcc 215MB/s ± 1% 227MB/s ± 0% +5.82% (p=0.008 n=5+5)
puffs_zlib_decode_100k/gcc 235MB/s ± 1% 257MB/s ± 0% +9.67% (p=0.008 n=5+5)
2017-11-08 17:19:58 +11:00
Nigel Tao
989614df88
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)
2017-11-08 17:08:36 +11:00
Nigel Tao
848d66ffdf
Tighten the Huffman n_bits invariant.
2017-11-07 09:30:16 +11:00
Nigel Tao
934705a6e1
Remove some suspensions from decode_huffman_fast.
...
name old speed new speed delta
puffs_adler32_10k/clang 2.46GB/s ± 0% 2.46GB/s ± 0% ~ (p=0.243 n=10+9)
puffs_adler32_100k/clang 2.46GB/s ± 0% 2.46GB/s ± 0% +0.07% (p=0.002 n=10+9)
puffs_flate_decode_1k/clang 125MB/s ± 0% 124MB/s ± 0% -0.58% (p=0.000 n=10+8)
puffs_flate_decode_10k/clang 168MB/s ± 0% 165MB/s ± 0% -2.07% (p=0.000 n=9+8)
puffs_flate_decode_100k/clang 203MB/s ± 0% 195MB/s ± 0% -3.85% (p=0.000 n=9+9)
puffs_zlib_decode_10k/clang 157MB/s ± 0% 154MB/s ± 1% -2.07% (p=0.000 n=9+9)
puffs_zlib_decode_100k/clang 187MB/s ± 0% 181MB/s ± 0% -3.50% (p=0.000 n=10+10)
puffs_adler32_10k/gcc 3.20GB/s ± 1% 3.26GB/s ± 0% +2.07% (p=0.000 n=10+9)
puffs_adler32_100k/gcc 3.21GB/s ± 1% 3.27GB/s ± 0% +1.71% (p=0.000 n=9+9)
puffs_flate_decode_1k/gcc 128MB/s ± 2% 112MB/s ± 0% -12.35% (p=0.000 n=10+10)
puffs_flate_decode_10k/gcc 181MB/s ± 1% 155MB/s ± 0% -14.07% (p=0.000 n=10+10)
puffs_flate_decode_100k/gcc 208MB/s ± 0% 176MB/s ± 0% -15.23% (p=0.000 n=9+9)
puffs_zlib_decode_10k/gcc 172MB/s ± 1% 137MB/s ± 0% -20.14% (p=0.000 n=10+9)
puffs_zlib_decode_100k/gcc 195MB/s ± 1% 158MB/s ± 0% -18.97% (p=0.000 n=10+9)
2017-11-05 21:59:59 +11:00
Nigel Tao
325c36314a
Prepare decode_huffman_fast to rewind in.src.
2017-11-05 14:13:27 +11:00
Nigel Tao
f6e072fe77
Add some more "inconsistent n_bits" checks.
...
This uncovered a bug in the decode_huffman_fast function. A follow up commit
will actually fix the bug.
For what it's worth, some benchmark numbers are below, but they're
possibly bogus, as we might be decoding incorrect (and truncated) output
for some inputs. Everything since "f968950 Read bits up front in
decode_huffman_fast" landed possibly has bogus numbers too.
name old speed new speed delta
puffs_flate_decode_100k/clang 194MB/s ± 0% 204MB/s ± 1% +5.02% (p=0.008 n=5+5)
puffs_flate_decode_100k/gcc 180MB/s ± 3% 202MB/s ± 1% +12.09% (p=0.008 n=5+5)
2017-11-05 09:23:49 +11:00
Nigel Tao
aa1f0078db
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)
2017-11-04 14:45:11 +11:00
Nigel Tao
c550ad9bda
Add redundant but clearer continue/break labels.
2017-11-04 14:14:07 +11:00
Nigel Tao
ded044da41
Add a flate end_of_block field.
2017-11-04 14:12:38 +11:00
Nigel Tao
4810db3994
Rename decode_huffman to decode_huffman_slow.
2017-11-04 13:38:24 +11:00
Nigel Tao
c3420dd138
Refactor std/flate/*.puffs code.
2017-11-04 13:31:39 +11:00