mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj: Use bitfield for LSym attributes
Reduces the size of LSym struct. On 32bit: before 84 after 76 On 64bit: before 136 after 128 name old time/op new time/op delta Template 182ms ± 3% 182ms ± 3% ~ (p=0.607 n=19+20) Unicode 93.5ms ± 4% 94.2ms ± 3% ~ (p=0.141 n=20+19) GoTypes 608ms ± 1% 605ms ± 2% ~ (p=0.056 n=20+20) name old user-ns/op new user-ns/op delta Template 249M ± 7% 249M ± 4% ~ (p=0.605 n=18+19) Unicode 149M ±14% 151M ± 5% ~ (p=0.724 n=20+17) GoTypes 855M ± 4% 853M ± 3% ~ (p=0.537 n=19+19) name old alloc/op new alloc/op delta Template 40.3MB ± 0% 40.3MB ± 0% -0.11% (p=0.000 n=19+20) Unicode 33.8MB ± 0% 33.8MB ± 0% -0.08% (p=0.000 n=20+20) GoTypes 119MB ± 0% 119MB ± 0% -0.10% (p=0.000 n=19+20) name old allocs/op new allocs/op delta Template 383k ± 0% 383k ± 0% ~ (p=0.703 n=20+20) Unicode 317k ± 0% 317k ± 0% ~ (p=0.982 n=19+18) GoTypes 1.14M ± 0% 1.14M ± 0% ~ (p=0.086 n=20+20) Change-Id: Id6ba0db3ecc4503a4e9af3ed0d5884d4366e8bf9 Reviewed-on: https://go-review.googlesource.com/31870 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Shahar Kohanim <skohanim@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
2ee82edfc2
commit
d391dc260a
16 changed files with 134 additions and 109 deletions
|
|
@ -443,7 +443,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
|
|||
p.From.Type = obj.TYPE_MEM
|
||||
p.From.Name = obj.NAME_EXTERN
|
||||
p.From.Sym = obj.Linklookup(gc.Ctxt, literal, 0)
|
||||
p.From.Sym.Local = true
|
||||
p.From.Sym.Set(obj.AttrLocal, true)
|
||||
p.To.Type = obj.TYPE_REG
|
||||
p.To.Reg = v.Reg()
|
||||
case ssa.Op386MOVSSconst2, ssa.Op386MOVSDconst2:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue