ec1724bc99
Remove some duplicate type switching from encoder.value. reflect.Uint and reflect.Int don't have a case statement anymore, but since they aren't valid types there is no change in semantics. goos: darwin goarch: arm64 pkg: encoding/binary cpu: Apple M1 Pro │ base.txt │ simplify.txt │ │ sec/op │ sec/op vs base │ ReadSlice1000Int32s-10 2.649µ ± 1% 2.645µ ± 0% ~ (p=0.069 n=6) ReadStruct-10 204.8n ± 2% 199.9n ± 0% -2.39% (p=0.002 n=6) WriteStruct-10 185.6n ± 2% 154.0n ± 0% -17.03% (p=0.002 n=6) WriteSlice1000Structs-10 157.9µ ± 1% 125.0µ ± 0% -20.86% (p=0.002 n=6) ReadSlice1000Structs-10 162.6µ ± 2% 159.3µ ± 0% ~ (p=0.065 n=6) ReadInts-10 159.7n ± 1% 156.7n ± 0% -1.88% (p=0.002 n=6) WriteInts-10 134.2n ± 0% 134.1n ± 0% -0.11% (p=0.011 n=6) WriteSlice1000Int32s-10 2.680µ ± 0% 2.680µ ± 0% ~ (p=0.955 n=6) PutUint16-10 0.6253n ± 2% 0.6211n ± 0% -0.67% (p=0.013 n=6) AppendUint16-10 1.417n ± 2% 1.413n ± 0% ~ (p=0.065 n=6) PutUint32-10 0.6210n ± 0% 0.6210n ± 0% ~ (p=0.835 n=6) AppendUint32-10 1.414n ± 0% 1.414n ± 0% ~ (p=1.000 n=6) PutUint64-10 0.6210n ± 0% 0.6212n ± 0% ~ (p=0.260 n=6) AppendUint64-10 1.414n ± 1% 1.417n ± 0% ~ (p=0.097 n=6) LittleEndianPutUint16-10 0.6236n ± 0% 0.6238n ± 0% ~ (p=0.426 n=6) LittleEndianAppendUint16-10 1.419n ± 0% 1.421n ± 1% ~ (p=0.054 n=6) LittleEndianPutUint32-10 0.6236n ± 0% 0.6239n ± 0% ~ (p=0.457 n=6) LittleEndianAppendUint32-10 1.421n ± 3% 1.421n ± 0% ~ (p=1.000 n=6) LittleEndianPutUint64-10 0.6242n ± 1% 0.6239n ± 0% ~ (p=0.372 n=6) LittleEndianAppendUint64-10 1.421n ± 0% 1.421n ± 0% ~ (p=1.000 n=6) ReadFloats-10 39.39n ± 0% 39.35n ± 0% -0.10% (p=0.026 n=6) WriteFloats-10 33.64n ± 0% 33.65n ± 0% ~ (p=0.297 n=6) ReadSlice1000Float32s-10 2.661µ ± 0% 2.664µ ± 0% ~ (p=0.916 n=6) WriteSlice1000Float32s-10 2.763µ ± 0% 2.758µ ± 2% ~ (p=0.225 n=6) ReadSlice1000Uint8s-10 129.5n ± 2% 129.5n ± 2% ~ (p=0.485 n=6) WriteSlice1000Uint8s-10 144.4n ± 4% 146.1n ± 2% ~ (p=0.065 n=6) PutUvarint32-10 12.12n ± 0% 12.12n ± 2% ~ (p=0.933 n=6) PutUvarint64-10 30.75n ± 0% 31.29n ± 1% +1.76% (p=0.002 n=6) geomean 33.44n 32.89n -1.65% Change-Id: Ibce978012c268a7f26fe7567c340c861fa4b115d Reviewed-on: https://go-review.googlesource.com/c/go/+/579156 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.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.