]>
Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: don't read symbol name if not needed
Most of the time of goobj2.Sym.Read is spent in reading the
symbol name. Sometimes the name is not needed, so don't read
it.
This brings the linking time pretty much back to the old linker.
On my Mac,
$ time go build cmd/compile # (new)
real 0m1.016s
user 0m1.164s
sys 0m0.297s
$ time go-tip build cmd/compile # (old)
real 0m0.980s
user 0m1.229s
sys 0m0.309s
Again, this is a bit ugly. Maybe we want to consider moving
symbol names out of Sym, to a separate section of the object
file?
Change-Id: Ia9085c15aa4d614b7eae126e71a79d6806c75055
Reviewed-on: https://go-review.googlesource.com/c/go/+/218480
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>