mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +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
+11
-7
@@ -102,6 +102,7 @@ const (
|
||||
FlagsClassy = Flags(0x00001000)
|
||||
FlagsSubExprHasEffect = Flags(0x00002000)
|
||||
FlagsRetsError = Flags(0x00004000)
|
||||
FlagsPrivateData = Flags(0x00008000)
|
||||
)
|
||||
|
||||
func (f Flags) AsEffect() Effect { return Effect(f) }
|
||||
@@ -453,19 +454,22 @@ func NewVar(name t.ID, xType *TypeExpr) *Var {
|
||||
}
|
||||
|
||||
// Field is a "name type" struct field:
|
||||
// - FlagsPrivateData is the initializer need not explicitly memset to zero.
|
||||
// - ID2: name
|
||||
// - LHS: <TypeExpr>
|
||||
type Field Node
|
||||
|
||||
func (n *Field) AsNode() *Node { return (*Node)(n) }
|
||||
func (n *Field) Name() t.ID { return n.id2 }
|
||||
func (n *Field) XType() *TypeExpr { return n.lhs.AsTypeExpr() }
|
||||
func (n *Field) AsNode() *Node { return (*Node)(n) }
|
||||
func (n *Field) PrivateData() bool { return n.flags&FlagsPrivateData != 0 }
|
||||
func (n *Field) Name() t.ID { return n.id2 }
|
||||
func (n *Field) XType() *TypeExpr { return n.lhs.AsTypeExpr() }
|
||||
|
||||
func NewField(name t.ID, xType *TypeExpr) *Field {
|
||||
func NewField(flags Flags, name t.ID, xType *TypeExpr) *Field {
|
||||
return &Field{
|
||||
kind: KField,
|
||||
id2: name,
|
||||
lhs: xType.AsNode(),
|
||||
kind: KField,
|
||||
flags: flags,
|
||||
id2: name,
|
||||
lhs: xType.AsNode(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user