• Michel Lespinasse's avatar
    cmd/compile: optimize remaining convT2I calls · 859b63cc
    Michel Lespinasse authored
    See #14874
    Updates #6853
    
    This change adds a compiler optimization for non pointer shaped convT2I.
    Since itab symbols are now emitted by the compiler, the itab address can
    be passed directly to convT2I instead of passing the iface type and a
    cache pointer argument.
    
    Compilebench results for the 5-commits series ending here:
    
    name       old time/op     new time/op     delta
    Template       336ms ± 4%      344ms ± 4%   +2.61%          (p=0.027 n=9+8)
    Unicode        165ms ± 6%      173ms ± 7%   +5.11%          (p=0.014 n=9+9)
    GoTypes        1.09s ± 1%      1.06s ± 2%   -3.29%          (p=0.000 n=9+9)
    Compiler       5.09s ±10%      4.75s ±10%   -6.64%        (p=0.011 n=10+10)
    MakeBash       31.1s ± 5%      30.3s ± 3%     ~           (p=0.089 n=10+10)
    
    name       old text-bytes  new text-bytes  delta
    HelloSize       558k ± 0%       558k ± 0%   +0.02%        (p=0.000 n=10+10)
    CmdGoSize      6.24M ± 0%      6.11M ± 0%   -2.11%        (p=0.000 n=10+10)
    
    name       old data-bytes  new data-bytes  delta
    HelloSize      3.66k ± 0%      3.74k ± 0%   +2.41%        (p=0.000 n=10+10)
    CmdGoSize       134k ± 0%       162k ± 0%  +20.76%        (p=0.000 n=10+10)
    
    name       old bss-bytes   new bss-bytes   delta
    HelloSize       126k ± 0%       126k ± 0%     ~     (all samples are equal)
    CmdGoSize       149k ± 0%       146k ± 0%   -2.17%        (p=0.000 n=10+10)
    
    name       old exe-bytes   new exe-bytes   delta
    HelloSize       924k ± 0%       924k ± 0%   +0.05%        (p=0.000 n=10+10)
    CmdGoSize      9.77M ± 0%      9.62M ± 0%   -1.47%        (p=0.000 n=10+10)
    
    Change-Id: Ib230ddc04988824035c32287ae544a965fedd344
    Reviewed-on: https://go-review.googlesource.com/20902Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
    Run-TryBot: Michel Lespinasse <walken@google.com>
    859b63cc
Name
Last commit
Last update
..
runtime.go Loading commit data...
unsafe.go Loading commit data...