• shaharko's avatar
    cmd/internal/obj: Use bitfield for LSym attributes · d391dc26
    shaharko authored
    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/31870Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
    Run-TryBot: Shahar Kohanim <skohanim@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    d391dc26
ssa.go 25.1 KB