Remove some suspensions from decode_huffman_fast.

name                           old speed      new speed      delta

puffs_adler32_10k/clang        2.41GB/s ± 1%  2.39GB/s ± 2%  -0.88%  (p=0.022 n=9+10)
puffs_adler32_100k/clang       2.41GB/s ± 1%  2.39GB/s ± 2%    ~     (p=0.095 n=10+9)
puffs_flate_decode_1k/clang     136MB/s ± 2%   134MB/s ± 1%  -0.86%  (p=0.036 n=9+8)
puffs_flate_decode_10k/clang    172MB/s ± 0%   175MB/s ± 0%  +1.96%  (p=0.000 n=8+9)
puffs_flate_decode_100k/clang   206MB/s ± 0%   209MB/s ± 1%  +1.38%  (p=0.000 n=8+9)
puffs_zlib_decode_10k/clang     160MB/s ± 1%   163MB/s ± 2%  +1.73%  (p=0.001 n=9+9)
puffs_zlib_decode_100k/clang    189MB/s ± 1%   188MB/s ± 6%    ~     (p=0.143 n=10+10)

puffs_adler32_10k/gcc          3.27GB/s ± 0%  3.20GB/s ± 2%  -2.03%  (p=0.000 n=8+10)
puffs_adler32_100k/gcc         3.27GB/s ± 0%  3.21GB/s ± 1%  -1.89%  (p=0.000 n=8+10)
puffs_flate_decode_1k/gcc       141MB/s ± 1%   139MB/s ± 1%  -1.66%  (p=0.000 n=9+10)
puffs_flate_decode_10k/gcc      200MB/s ± 0%   209MB/s ± 1%  +4.73%  (p=0.000 n=10+10)
puffs_flate_decode_100k/gcc     242MB/s ± 0%   237MB/s ± 0%  -2.19%  (p=0.000 n=9+10)
puffs_zlib_decode_10k/gcc       188MB/s ± 0%   195MB/s ± 1%  +3.71%  (p=0.000 n=10+10)
puffs_zlib_decode_100k/gcc      225MB/s ± 0%   221MB/s ± 0%  -1.84%  (p=0.000 n=8+9)
This commit is contained in:
Nigel Tao committed 2017-11-06 16:59:27 +11:00
1 parent 058938006a
commit 0bc6f792fb
5 files changed
+24 -92

No files matched your search

+4 -6
View File
@@ -460,12 +460,10 @@ func (g *gen) writeCallSuspendibles(b *buffer, n *a.Expr, depth uint32) error {
b.printf(" = *%srptr_src++;\n", bPrefix)
} else if isInSrc(g.tm, n, t.KeyUnreadU8, 0) {
if !n.ProvenNotToSuspend() {
b.printf("if (%srptr_src == %srstart_src) { status = %sERROR_INVALID_I_O_OPERATION;",
bPrefix, bPrefix, g.PKGPREFIX)
b.writes("goto exit;")
b.writes("}\n")
}
b.printf("if (%srptr_src == %srstart_src) { status = %sERROR_INVALID_I_O_OPERATION;",
bPrefix, bPrefix, g.PKGPREFIX)
b.writes("goto exit;")
b.writes("}\n")
b.printf("%srptr_src--;\n", bPrefix)
} else if isInSrc(g.tm, n, t.KeyReadU16BE, 0) {