• shaharko's avatar
    cmd/compile: only generate ·f symbols when necessary · 00174381
    shaharko authored
    Before go supported buildmode=shared ·f symbols used to be defined
    only when they were used. In order to solve #11480 the strategy
    was changed to have these symbols defined on declaration which is
    less efficient and generates many unneeded symbols.
    With this change the best strategy is chosen for each situation,
    improving static linking time:
    
    name            old s/op    new s/op    delta
    LinkCmdCompile   0.27 ± 5%   0.25 ± 6%  -8.22%   (p=0.000 n=98+96)
    LinkCmdGo        0.30 ± 6%   0.29 ± 8%  -5.03%   (p=0.000 n=95+99)
    
    name            old MaxRSS  new MaxRSS  delta
    LinkCmdCompile   107k ± 2%    98k ± 3%  -8.32%  (p=0.000 n=99+100)
    LinkCmdGo        106k ± 3%   104k ± 3%  -1.94%  (p=0.000 n=99+100)
    
    Change-Id: I965eeee30541e724fd363804adcd6fda10f965a4
    Reviewed-on: https://go-review.googlesource.com/31031Reviewed-by: 's avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
    00174381
closure.go 18.5 KB