mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 01:01:35 +01:00
Move cgen's sub-structs to private_data
name old speed new speed delta wuffs_gif_decode_1k_bw/clang5 243MB/s ± 1% 243MB/s ± 1% ~ (p=0.101 n=47+48) wuffs_gif_decode_1k_color/clang5 142MB/s ± 1% 142MB/s ± 1% +0.36% (p=0.000 n=48+47) wuffs_gif_decode_10k_bgra/clang5 734MB/s ± 1% 728MB/s ± 1% -0.78% (p=0.000 n=46+50) wuffs_gif_decode_10k_indexed/clang5 197MB/s ± 0% 196MB/s ± 1% -0.52% (p=0.000 n=47+46) wuffs_gif_decode_20k/clang5 250MB/s ± 1% 249MB/s ± 1% ~ (p=0.189 n=49+46) wuffs_gif_decode_100k_artificial/clang5 556MB/s ± 1% 555MB/s ± 1% -0.23% (p=0.000 n=46+44) wuffs_gif_decode_100k_realistic/clang5 229MB/s ± 1% 229MB/s ± 0% ~ (p=0.055 n=48+48) wuffs_gif_decode_1000k/clang5 233MB/s ± 1% 234MB/s ± 0% +0.30% (p=0.000 n=48+45) wuffs_gif_decode_anim_screencap/clang5 1.11GB/s ± 1% 1.10GB/s ± 0% -0.28% (p=0.000 n=46+47) wuffs_gif_decode_1k_bw/gcc7 257MB/s ± 2% 263MB/s ± 1% +2.67% (p=0.000 n=49+47) wuffs_gif_decode_1k_color/gcc7 142MB/s ± 1% 146MB/s ± 1% +3.25% (p=0.000 n=50+49) wuffs_gif_decode_10k_bgra/gcc7 627MB/s ± 1% 625MB/s ± 1% -0.35% (p=0.000 n=48+49) wuffs_gif_decode_10k_indexed/gcc7 197MB/s ± 1% 196MB/s ± 1% -0.21% (p=0.000 n=48+43) wuffs_gif_decode_20k/gcc7 239MB/s ± 0% 239MB/s ± 1% +0.21% (p=0.000 n=50+47) wuffs_gif_decode_100k_artificial/gcc7 511MB/s ± 0% 512MB/s ± 1% +0.21% (p=0.000 n=49+44) wuffs_gif_decode_100k_realistic/gcc7 211MB/s ± 0% 212MB/s ± 1% +0.39% (p=0.000 n=45+44) wuffs_gif_decode_1000k/gcc7 215MB/s ± 0% 216MB/s ± 1% +0.13% (p=0.002 n=46+48) wuffs_gif_decode_anim_screencap/gcc7 1.06GB/s ± 1% 1.06GB/s ± 1% +0.12% (p=0.007 n=45+48) wuffs_lzw_decode_20k/clang5 271MB/s ± 1% 270MB/s ± 1% -0.34% (p=0.000 n=49+49) wuffs_lzw_decode_100k/clang5 480MB/s ± 1% 478MB/s ± 1% -0.31% (p=0.001 n=48+50) wuffs_lzw_decode_20k/gcc7 263MB/s ± 1% 264MB/s ± 1% +0.38% (p=0.000 n=45+47) wuffs_lzw_decode_100k/gcc7 476MB/s ± 1% 482MB/s ± 2% +1.30% (p=0.000 n=47+50)
This commit is contained in:
1 parent
664c47fe3c
commit
0ab52c6204
6 files changed
+88
-38
No files matched your search
@@ -217,13 +217,29 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, depth uint32) error {
|
||||
} else {
|
||||
b.writes(".")
|
||||
}
|
||||
b.writes("private_impl." + fPrefix)
|
||||
|
||||
b.writes(g.privateImplData(lhs.MType(), n.Ident()))
|
||||
b.writeb('.')
|
||||
b.writes(fPrefix)
|
||||
b.writes(n.Ident().Str(g.tm))
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unrecognized token (0x%X) for writeExprOther", n.Operator())
|
||||
}
|
||||
|
||||
func (g *gen) privateImplData(typ *a.TypeExpr, fieldName t.ID) string {
|
||||
if p := typ.Decorator(); p == t.IDNptr || p == t.IDPtr {
|
||||
typ = typ.Inner()
|
||||
}
|
||||
if s := g.structMap[typ.QID()]; s != nil {
|
||||
qid := s.QID()
|
||||
if _, ok := g.privateDataFields[t.QQID{qid[0], qid[1], fieldName}]; ok {
|
||||
return "private_data"
|
||||
}
|
||||
}
|
||||
return "private_impl"
|
||||
}
|
||||
|
||||
func (g *gen) writeExprUnaryOp(b *buffer, n *a.Expr, depth uint32) error {
|
||||
op := n.Operator()
|
||||
opName := cOpName(op)
|
||||
|
||||
Reference in new issue
Block a user