]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: only generate ·f symbols when necessary
authorshaharko <skohanim@gmail.com>
Thu, 13 Oct 2016 19:56:38 +0000 (22:56 +0300)
committerShahar Kohanim <skohanim@gmail.com>
Tue, 25 Oct 2016 05:16:34 +0000 (05:16 +0000)
commit001743813971e0870144443399f2fb396b3781b7
treeabe3315103effb83fc4ea16fce53f0a3d6282869
parent5d8324e6822e34c900e36d67adf640cee6693d25
cmd/compile: only generate ·f symbols when necessary

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/31031
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
src/cmd/compile/internal/gc/closure.go
src/cmd/compile/internal/gc/dcl.go