Remove some suspensions from decode_huffman_fast.

name                           old speed      new speed      delta

puffs_adler32_10k/clang        2.45GB/s ± 0%  2.45GB/s ± 0%   -0.08%  (p=0.006 n=10+9)
puffs_adler32_100k/clang       2.46GB/s ± 0%  2.45GB/s ± 0%   -0.12%  (p=0.000 n=10+9)
puffs_flate_decode_1k/clang     137MB/s ± 0%   133MB/s ± 0%   -2.71%  (p=0.000 n=9+9)
puffs_flate_decode_10k/clang    177MB/s ± 0%   181MB/s ± 0%   +2.22%  (p=0.000 n=10+9)
puffs_flate_decode_100k/clang   198MB/s ± 0%   204MB/s ± 0%   +3.04%  (p=0.000 n=10+10)
puffs_zlib_decode_10k/clang     163MB/s ± 0%   168MB/s ± 0%   +3.23%  (p=0.000 n=9+10)
puffs_zlib_decode_100k/clang    182MB/s ± 0%   189MB/s ± 0%   +3.56%  (p=0.000 n=9+10)

puffs_adler32_10k/gcc          3.26GB/s ± 0%  3.26GB/s ± 0%     ~     (p=0.280 n=10+10)
puffs_adler32_100k/gcc         3.27GB/s ± 0%  3.27GB/s ± 0%     ~     (p=0.075 n=10+10)
puffs_flate_decode_1k/gcc       111MB/s ± 1%   130MB/s ± 0%  +17.19%  (p=0.000 n=10+10)
puffs_flate_decode_10k/gcc      142MB/s ± 0%   203MB/s ± 0%  +43.11%  (p=0.000 n=10+9)
puffs_flate_decode_100k/gcc     153MB/s ± 0%   241MB/s ± 0%  +57.62%  (p=0.000 n=9+8)
puffs_zlib_decode_10k/gcc       142MB/s ± 0%   188MB/s ± 0%  +32.47%  (p=0.000 n=9+9)
puffs_zlib_decode_100k/gcc      149MB/s ± 0%   223MB/s ± 0%  +50.03%  (p=0.000 n=8+9)
This commit is contained in:
Nigel Tao committed 2017-11-06 14:03:11 +11:00
1 parent bf50d268ae
commit ccdd74a17f
2 files changed
+17 -39

No files matched your search

+8 -18
View File
@@ -2291,25 +2291,15 @@ static puffs_flate__status puffs_flate__flate_decoder__decode_huffman_fast(
v_hdist),
v_hlen);
if (v_hlen <= v_n_copied) {
v_hlen = 0;
goto label_1_break;
}
if (v_n_copied > 0) {
v_hlen -= v_n_copied;
v_hdist = ((v_hdist + v_n_copied) & 32767);
if (v_hdist == 0) {
if (v_hlen > 0) {
puffs_base__writer1__copy_from_slice32(
&b_wptr_dst, b_wend_dst,
((puffs_base__slice_u8){
.ptr = self->private_impl.f_history, .len = 32768}),
v_hlen);
}
goto label_1_break;
}
}
status = PUFFS_FLATE__SUSPENSION_SHORT_WRITE;
PUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(3);
v_hlen -= v_n_copied;
puffs_base__writer1__copy_from_slice32(
&b_wptr_dst, b_wend_dst,
((puffs_base__slice_u8){.ptr = self->private_impl.f_history,
.len = 32768}),
v_hlen);
goto label_1_break;
}
label_1_break:;
if (v_length == 0) {
@@ -2326,7 +2316,7 @@ static puffs_flate__status puffs_flate__flate_decoder__decode_huffman_fast(
label_0_break:;
while (v_n_bits >= 8) {
v_n_bits -= 8;
PUFFS_BASE__COROUTINE_SUSPENSION_POINT(4);
PUFFS_BASE__COROUTINE_SUSPENSION_POINT(3);
if (b_rptr_src == b_rstart_src) {
status = PUFFS_FLATE__ERROR_INVALID_I_O_OPERATION;
goto exit;