]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: minor performance tweaks in dodata
authorThan McIntosh <thanm@google.com>
Wed, 29 Apr 2020 22:46:44 +0000 (18:46 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 30 Apr 2020 16:16:30 +0000 (16:16 +0000)
commit404f626ee5c41cefef976a9185a40af4359e7152
treee32d932715e1d16e1d1eb2e24faa0d596e51ec0e
parent2a00c137b1a503e2482598cefe888e8bf581f3fe
[dev.link] cmd/link: minor performance tweaks in dodata

Tweak doDataSect to reduce symbol sorting overhead, and calculate size
ahead of allocating the ctxt.datap slice. Yields a small speedup
(2-3%) linking kubelet.

Change-Id: I82869f5276caa4bee9f6e6f41da2b240e601ce50
Reviewed-on: https://go-review.googlesource.com/c/go/+/231047
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/ld/data.go