mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +01:00
Collect GIF's LZW data into larger batches
name old speed new speed delta wuffs_gif_decode_1k_bw/clang 224MB/s ± 1% 227MB/s ± 0% +0.98% (p=0.000 n=10+9) wuffs_gif_decode_1k_color/clang 116MB/s ± 1% 118MB/s ± 1% +2.26% (p=0.000 n=10+10) wuffs_gif_decode_10k_bgra/clang 541MB/s ± 0% 568MB/s ± 1% +4.97% (p=0.000 n=9+10) wuffs_gif_decode_10k_indexed/clang 144MB/s ± 0% 152MB/s ± 0% +5.61% (p=0.000 n=9+10) wuffs_gif_decode_100k_artificial/clang 438MB/s ± 1% 454MB/s ± 1% +3.56% (p=0.000 n=9+10) wuffs_gif_decode_100k_realistic/clang 171MB/s ± 0% 179MB/s ± 0% +4.64% (p=0.000 n=8+10) wuffs_gif_decode_1000k/clang 174MB/s ± 0% 180MB/s ± 0% +3.90% (p=0.000 n=9+10) wuffs_gif_decode_anim_screencap/clang 897MB/s ± 1% 943MB/s ± 0% +5.10% (p=0.000 n=9+9) wuffs_gif_decode_1k_bw/gcc 250MB/s ± 1% 241MB/s ± 1% -3.26% (p=0.000 n=10+10) wuffs_gif_decode_1k_color/gcc 132MB/s ± 1% 130MB/s ± 1% -2.15% (p=0.000 n=10+10) wuffs_gif_decode_10k_bgra/gcc 534MB/s ± 1% 535MB/s ± 1% ~ (p=0.211 n=9+10) wuffs_gif_decode_10k_indexed/gcc 162MB/s ± 1% 163MB/s ± 0% ~ (p=0.105 n=10+10) wuffs_gif_decode_100k_artificial/gcc 460MB/s ± 0% 456MB/s ± 0% -0.80% (p=0.000 n=10+10) wuffs_gif_decode_100k_realistic/gcc 186MB/s ± 0% 186MB/s ± 1% -0.33% (p=0.001 n=9+10) wuffs_gif_decode_1000k/gcc 189MB/s ± 1% 188MB/s ± 1% ~ (p=0.053 n=9+10) wuffs_gif_decode_anim_screencap/gcc 981MB/s ± 1% 971MB/s ± 1% -0.95% (p=0.000 n=10+10)
This commit is contained in:
1 parent
e497b38da0
commit
33a4557d98
9 files changed
+325
-158
No files matched your search
@@ -104,12 +104,11 @@ func (g *gen) writeBuiltinIO(b *buffer, recv *a.Expr, method t.ID, args []*a.Nod
|
||||
return nil
|
||||
|
||||
case t.IDSet:
|
||||
typ := "reader"
|
||||
typ, v := "reader", "r"
|
||||
if len(args) == 1 {
|
||||
typ = "writer"
|
||||
typ, v = "writer", "w"
|
||||
}
|
||||
// TODO: don't hard-code v_w and u_w.
|
||||
b.printf("wuffs_base__io_%s__set(&v_w, &u_w, &iop_v_w, &io1_v_w,", typ)
|
||||
b.printf("wuffs_base__io_%s__set(&v_%s, &u_%s, &iop_v_%s, &io1_v_%s,", typ, v, v, v, v)
|
||||
return g.writeArgs(b, args, depth)
|
||||
|
||||
}
|
||||
@@ -142,13 +141,18 @@ func (g *gen) writeBuiltinIOReader(b *buffer, recv *a.Expr, method t.ID, args []
|
||||
return nil
|
||||
|
||||
case t.IDSinceMark, t.IDSinceMarkLength:
|
||||
prefix, name := aPrefix, "src"
|
||||
if recv.Operator() == 0 {
|
||||
prefix, name = vPrefix, recv.Ident().Str(g.tm)
|
||||
}
|
||||
|
||||
if method == t.IDSinceMark {
|
||||
b.printf("((wuffs_base__slice_u8){ "+
|
||||
".ptr = %ssrc.private_impl.mark, "+
|
||||
".ptr = %s%s.private_impl.mark, "+
|
||||
".len = (size_t)(",
|
||||
aPrefix)
|
||||
prefix, name)
|
||||
}
|
||||
b.printf("iop_a_src - %ssrc.private_impl.mark", aPrefix)
|
||||
b.printf("iop_%s%s - %s%s.private_impl.mark", prefix, name, prefix, name)
|
||||
if method == t.IDSinceMark {
|
||||
b.writes("), })")
|
||||
}
|
||||
@@ -165,6 +169,10 @@ func (g *gen) writeBuiltinIOReader(b *buffer, recv *a.Expr, method t.ID, args []
|
||||
}
|
||||
b.writes(", wuffs_base__return_empty_struct())")
|
||||
return nil
|
||||
|
||||
case t.IDTake:
|
||||
b.printf("wuffs_base__io_reader__take(&iop_a_src, io1_a_src,")
|
||||
return g.writeArgs(b, args, depth)
|
||||
}
|
||||
|
||||
if method >= peekMethodsBase {
|
||||
|
||||
Reference in new issue
Block a user