]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: parallelize reloc sym
authorJeremy Faller <jeremy@golang.org>
Tue, 25 Feb 2020 02:08:12 +0000 (21:08 -0500)
committerJeremy Faller <jeremy@golang.org>
Mon, 9 Mar 2020 14:24:52 +0000 (14:24 +0000)
commit491615e3f7acca2964744307adf3655eb3e778b2
tree49b66ec2b12f3d0f994d6035abd45e0bc68d03e3
parent3d3db8beff05c6366523523bc202c805ad15cae3
[dev.link] cmd/link: parallelize reloc sym

I tried a couple of different architectures (goroutine per symbol, 8
goroutines handling symbols from channels, and this architecture), and
this was the best. Another possible approach could be to divide up the
space of relocations, forgo the channels, and just pass slices to the
relocation routines, which would possibly be faster.

Reloc                     13.9ms ± 5%      9.0ms ±10%       -35.09%  (p=0.000 n=8+9)

Change-Id: I5111220e855313fae4b89d64277759c4dc33b697
Reviewed-on: https://go-review.googlesource.com/c/go/+/220842
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/ld/data.go