After allocating a Node that needs a Name, Param, and/or Func field, we never clear that field, so we can reduce GC overhead slightly by allocating them together with the owner Node. name old time/op new time/op delta Template 325ms ± 7% 325ms ± 7% ~ (p=0.910 n=29+30) Unicode 177ms ±12% 173ms ±11% ~ (p=0.110 n=29+30) GoTypes 1.06s ± 7% 1.05s ± 5% -1.22% (p=0.027 n=30+30) Compiler 4.48s ± 3% 4.47s ± 3% ~ (p=0.423 n=30+30) name old user-ns/op new user-ns/op delta Template 476M ±22% 467M ±14% ~ (p=0.310 n=29+30) Unicode 298M ±22% 294M ±25% ~ (p=0.335 n=30+30) GoTypes 1.54G ± 9% 1.48G ± 9% -4.06% (p=0.000 n=30+30) Compiler 6.26G ± 6% 6.14G ± 6% -1.90% (p=0.004 n=30+30) name old alloc/op new alloc/op delta Template 40.9MB ± 0% 41.1MB ± 0% +0.53% (p=0.000 n=30+30) Unicode 30.9MB ± 0% 31.0MB ± 0% +0.16% (p=0.000 n=30+30) GoTypes 122MB ± 0% 123MB ± 0% +0.37% (p=0.000 n=30+30) Compiler 477MB ± 0% 479MB ± 0% +0.37% (p=0.000 n=30+29) name old allocs/op new allocs/op delta Template 400k ± 1% 376k ± 1% -5.96% (p=0.000 n=30+30) Unicode 330k ± 1% 325k ± 1% -1.48% (p=0.000 n=30+30) GoTypes 1.22M ± 0% 1.16M ± 0% -4.38% (p=0.000 n=30+30) Compiler 4.35M ± 0% 4.13M ± 0% -5.08% (p=0.000 n=30+29) Change-Id: I9bdc7d9223bb32f785df71810564e82d9a76d109 Reviewed-on: https://go-review.googlesource.com/36022 Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@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.
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.
