128d96b3ca
Inline the IPv6-case of joinHostPort and avoid the check for a colon in the address. The address is already known to be an IPv6 address. Also use iota.Uitoa to convert the uin16 port. name old time/op new time/op delta AddrPortString/v4-8 45.7ns ± 0% 46.6ns ± 1% +1.97% (p=0.000 n=10+10) AddrPortString/v6-8 106ns ± 3% 95ns ± 0% -10.79% (p=0.000 n=9+10) AddrPortString/v6_ellipsis-8 110ns ± 0% 96ns ± 0% -12.37% (p=0.000 n=9+10) AddrPortString/v6_v4-8 85.1ns ± 0% 70.8ns ± 0% -16.80% (p=0.000 n=9+10) AddrPortString/v6_zone-8 110ns ± 0% 97ns ± 0% -12.29% (p=0.000 n=10+10) name old alloc/op new alloc/op delta AddrPortString/v4-8 24.0B ± 0% 24.0B ± 0% ~ (all equal) AddrPortString/v6-8 101B ± 0% 96B ± 0% -4.95% (p=0.000 n=10+10) AddrPortString/v6_ellipsis-8 61.0B ± 0% 56.0B ± 0% -8.20% (p=0.000 n=10+10) AddrPortString/v6_v4-8 61.0B ± 0% 56.0B ± 0% -8.20% (p=0.000 n=10+10) AddrPortString/v6_zone-8 61.0B ± 0% 56.0B ± 0% -8.20% (p=0.000 n=10+10) name old allocs/op new allocs/op delta AddrPortString/v4-8 1.00 ± 0% 1.00 ± 0% ~ (all equal) AddrPortString/v6-8 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.000 n=10+10) AddrPortString/v6_ellipsis-8 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.000 n=10+10) AddrPortString/v6_v4-8 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.000 n=10+10) AddrPortString/v6_zone-8 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.000 n=10+10) Change-Id: I96a7f01c4e33bfa157a98558c62e2e0a8147726d Reviewed-on: https://go-review.googlesource.com/c/go/+/542395 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Damien Neil <dneil@google.com> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
go.env | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.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 4.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://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.