env.MkEnv was computing the full gcc command line to report as $GOGCCFLAGS in "go env" output, which meant running gcc (or clang) multiple times to discern which flags are available. We also set $GOGCCFLAGS in the environment, but nothing actually uses that as far as I can tell - it was always intended only for debugging. Move GOGCCFLAGS to env.ExtraEnvVars, which displayed in "go env" output but not set in child processes and not computed nearly as often. The effect is that trivial commands like "go help" or "go env GOARCH" or "go tool -n compile" now run in about 0.01s instead of 0.1s, because they no longer run gcc 4 times each. go test -short cmd/go drops from 81s to 44s (and needs more trimming). The $GOROOT/test suite drops from 92s to 33s, because the number of gcc invocation drops from 13,336 to 0. Overall, all.bash drops from 5m53s to 4m07s wall time. Change-Id: Ia85abc89e1e2bb126b933aff3bf7c5f6c0984cd5 Reviewed-on: https://go-review.googlesource.com/73850 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
|---|---|---|
| .github | ||
| api | ||
| doc | ||
| lib/time | ||
| misc | ||
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
| favicon.ico | ||
| robots.txt | ||
README.md
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Contributing
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project does not use GitHub pull requests, and that we use the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.