mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
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)
This commit is contained in:
1 parent
c550ad9bda
commit
aa1f0078db
8 files changed
+753
-2
No files matched your search
@@ -517,6 +517,14 @@ func (g *gen) writeCallSuspendibles(b *buffer, n *a.Expr, depth uint32) error {
|
||||
}
|
||||
b.writes("if (status) { goto suspend; }\n")
|
||||
|
||||
} else if isThisMethod(g.tm, n, "decode_huffman_fast", 2) {
|
||||
b.printf("status = %s%s__decode_huffman_fast(self, %sdst, %ssrc);\n",
|
||||
g.pkgPrefix, g.currFunk.astFunc.Receiver().String(g.tm), aPrefix, aPrefix)
|
||||
if err := g.writeLoadExprDerivedVars(b, n); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("if (status) { goto suspend; }\n")
|
||||
|
||||
} else if isThisMethod(g.tm, n, "decode_huffman_slow", 2) {
|
||||
b.printf("status = %s%s__decode_huffman_slow(self, %sdst, %ssrc);\n",
|
||||
g.pkgPrefix, g.currFunk.astFunc.Receiver().String(g.tm), aPrefix, aPrefix)
|
||||
|
||||
Reference in new issue
Block a user