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
@@ -89,6 +89,9 @@ func (g *gen) writeLoadDerivedVar(b *buffer, hack string, prefix string, name t.
|
||||
if hack == "w" {
|
||||
b.printf("%s%sw = %sw.data.ptr + %sw.meta.wi;\n", iopPrefix, vPrefix, uPrefix, uPrefix)
|
||||
return nil
|
||||
} else if hack == "r" {
|
||||
b.printf("%s%sr = %sr.data.ptr + %sr.meta.ri;\n", iopPrefix, vPrefix, uPrefix, uPrefix)
|
||||
return nil
|
||||
}
|
||||
|
||||
if !typ.IsIOType() {
|
||||
@@ -151,6 +154,9 @@ func (g *gen) writeSaveDerivedVar(b *buffer, hack string, prefix string, name t.
|
||||
if hack == "w" {
|
||||
b.printf("%sw.meta.wi = %s%sw - %sw.data.ptr;\n", uPrefix, iopPrefix, vPrefix, uPrefix)
|
||||
return nil
|
||||
} else if hack == "r" {
|
||||
b.printf("%sr.meta.ri = %s%sr - %sr.data.ptr;\n", uPrefix, iopPrefix, vPrefix, uPrefix)
|
||||
return nil
|
||||
}
|
||||
|
||||
if !typ.IsIOType() {
|
||||
@@ -188,11 +194,11 @@ func (g *gen) writeLoadExprDerivedVars(b *buffer, n *a.Expr) error {
|
||||
prefix := aPrefix
|
||||
// TODO: don't hard-code these.
|
||||
hack := ""
|
||||
if s := o.Value().Str(g.tm); s != "args.dst" && s != "args.src" && s != "w" {
|
||||
if s := o.Value().Str(g.tm); s != "args.dst" && s != "args.src" && s != "w" && s != "r" {
|
||||
continue
|
||||
} else if s == "w" {
|
||||
} else if s == "w" || s == "r" {
|
||||
prefix = vPrefix
|
||||
hack = "w"
|
||||
hack = s
|
||||
}
|
||||
if err := g.writeLoadDerivedVar(b, hack, prefix, o.Name(), o.Value().MType(), false); err != nil {
|
||||
return err
|
||||
@@ -213,11 +219,11 @@ func (g *gen) writeSaveExprDerivedVars(b *buffer, n *a.Expr) error {
|
||||
prefix := aPrefix
|
||||
// TODO: don't hard-code these.
|
||||
hack := ""
|
||||
if s := o.Value().Str(g.tm); s != "args.dst" && s != "args.src" && s != "w" {
|
||||
if s := o.Value().Str(g.tm); s != "args.dst" && s != "args.src" && s != "w" && s != "r" {
|
||||
continue
|
||||
} else if s == "w" {
|
||||
} else if s == "w" || s == "r" {
|
||||
prefix = vPrefix
|
||||
hack = "w"
|
||||
hack = s
|
||||
}
|
||||
if err := g.writeSaveDerivedVar(b, hack, prefix, o.Name(), o.Value().MType()); err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user