mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
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:
1 parent
058938006a
commit
0bc6f792fb
5 files changed
+24
-92
No files matched your search
+10
-8
@@ -1187,19 +1187,21 @@ func (q *checker) bcheckIOMethods(n *a.Expr, depth uint32) error {
|
||||
if receiver.ID0().Key() != t.KeyDot {
|
||||
return nil
|
||||
}
|
||||
receiver, method := receiver.LHS().Expr(), receiver.ID1().Key()
|
||||
|
||||
// TODO: check that receiver's type is actually a reader1 or writer1.
|
||||
|
||||
advance := (*big.Int)(nil)
|
||||
if key := receiver.ID1().Key(); key == t.KeyUnreadU8 {
|
||||
// TODO: call SetProvenNotToSuspend, since unread_u8 can never suspend,
|
||||
// only succeed or fail.
|
||||
} else if key < t.Key(len(ioMethodAdvances)) {
|
||||
advance = ioMethodAdvances[key]
|
||||
if method == t.KeyUnreadU8 {
|
||||
// unread_u8 can never suspend, only succeed or fail.
|
||||
n.SetProvenNotToSuspend()
|
||||
return nil
|
||||
} else if method < t.Key(len(ioMethodAdvances)) {
|
||||
advance = ioMethodAdvances[method]
|
||||
}
|
||||
if advance == nil {
|
||||
return nil
|
||||
}
|
||||
receiver = receiver.LHS().Expr()
|
||||
|
||||
// TODO: check that receiver's type is actually a reader1 or writer1.
|
||||
|
||||
return q.facts.update(func(x *a.Expr) (*a.Expr, error) {
|
||||
op := x.ID0().Key()
|
||||
|
||||
Reference in new issue
Block a user