]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: compile all functions concurrently
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 23 Apr 2017 12:06:22 +0000 (05:06 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 30 Mar 2018 21:38:50 +0000 (21:38 +0000)
commitfa3e9d27f333d1cdb75889c2bff8e71d62f82e11
tree31d73a9ce74b0b2b7d167f34b66b4d544dafc1a5
parentbefd5c44cc5e970dd4b021229d6162d8b56f111b
cmd/compile: compile all functions concurrently

CL 40693 added concurrent backend compilation support,
and used it for user-provided functions.
Autogenerated functions were still compiled serially.
This CL brings them into the fold.
As of this CL, when requested,
no functions are compiled serially.

There generally aren't many autogenerated functions.
When there are, this CL can help a lot,
because autogenerated functions are usually short.
Many short functions is the best case scenario
for concurrent compilation; see CL 41192.

One example of such a package comes from Dave Cheney's benchjuju:
github.com/juju/govmomi/vim25/types.
It has thousands of autogenerated functions.
This CL improves performance on the entire benchmark
by around a second on my machine at c=8, or about ~5%.

Updates #15756

Change-Id: Ia21e302b2469a9ed743df02244ec7ebde55b32f3
Reviewed-on: https://go-review.googlesource.com/41503
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/obj.go