]> Cypherpunks repositories - gostls13.git/commit
cmd/link: track offset instead of using seek
authorDavid Crawshaw <crawshaw@golang.org>
Mon, 29 Feb 2016 17:00:46 +0000 (08:00 -0900)
committerDavid Crawshaw <crawshaw@golang.org>
Mon, 29 Feb 2016 19:14:20 +0000 (19:14 +0000)
commit6d0b55193104357255dacc9b3270c944374eed97
tree3e9831067875a0bf2ae14bfb83ff6919045f882d
parented1a5e5da6fc904a612dac710f546bce779186fd
cmd/link: track offset instead of using seek

The Cpos function is used frequently (at least once per symbol) and
it is implemented with the seek syscall. Instead, track current
output offset and use it.

Building the godoc binary with DWARF, best of ten:

tip:  real 0m1.287s user 0m1.573s
this: real 0m1.208s user 0m1.555s

Change-Id: I068148695cd6b4d32cd145db25e59e6f6bae6945
Reviewed-on: https://go-review.googlesource.com/20055
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/link/internal/ld/lib.go