]> Cypherpunks repositories - gostls13.git/commit
cmd/link: refactor symbol lookup
authorShahar Kohanim <skohanim@gmail.com>
Sun, 27 Mar 2016 07:06:12 +0000 (10:06 +0300)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 28 Mar 2016 16:09:54 +0000 (16:09 +0000)
commit2e90192b0e774f44a2d918509e0bd32823ce5c2c
treeb4ca439b1ebbe44c7728624508d74382e39fe581
parent7e88826a69366bbcb64f2f89dbe02c57f7ebf678
cmd/link: refactor symbol lookup

Calling the read only Linkrlookup will now not cause the name
string to escape. So a lookup can be performed on a []byte
casted to a string without allocating. This will help a followup
cl and it is also much simpler and cleaner.
Performance not impacted by this.

name       old s/op   new s/op   delta
LinkCmdGo  0.51 ± 6%  0.51 ± 5%   ~     (p=0.192 n=98+98)

Change-Id: I7846ba3160eb845a3a29cbf0be703c47369ece16
Reviewed-on: https://go-review.googlesource.com/21187
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/link/internal/ld/ldelf.go
src/cmd/link/internal/ld/ldmacho.go
src/cmd/link/internal/ld/ldpe.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/objfile.go
src/cmd/link/internal/ld/sym.go