Skip to content

golang/go

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

fieldType is a struct with only a string and an integer,
so its size will barely be three times that of a pointer.

The indirection doesn't save us any memory or append/grow cost,
but it does cause a significant amount of allocations at init time.

	goos: linux
	goarch: amd64
	pkg: encoding/gob
	cpu: AMD Ryzen 7 PRO 5850U with Radeon Graphics
					│     old     │                new                 │
					│   sec/op    │   sec/op     vs base               │
	EndToEndPipe-16   730.9n ± 5%   741.6n ± 5%       ~ (p=0.529 n=10)
	EncodingGob       173.7µ ± 0%   171.1µ ± 0%  -1.46% (p=0.000 n=10)
	geomean           11.27µ        11.26µ       -0.01%

					│     old      │                  new                   │
					│     B/op     │     B/op      vs base                  │
	EndToEndPipe-16   1.766Ki ± 0%   1.766Ki ± 0%        ~ (p=1.000 n=10) ¹
	EncodingGob       38.27Ki ± 0%   34.30Ki ± 0%  -10.38% (p=0.000 n=10)
	geomean           8.221Ki        7.782Ki        -5.33%
	¹ all samples are equal

					│    old     │                 new                 │
					│ allocs/op  │ allocs/op   vs base                 │
	EndToEndPipe-16   2.000 ± 0%   2.000 ± 0%       ~ (p=1.000 n=10) ¹
	EncodingGob       642.0 ± 0%   615.0 ± 0%  -4.21% (p=0.000 n=10)
	geomean           35.83        35.07       -2.13%
	¹ all samples are equal

Change-Id: I852a799834d2e9b7b915da74e871a4052d13892e
Reviewed-on: https://go-review.googlesource.com/c/go/+/479400
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
f80e270

Files

Permalink
Failed to load latest commit information.

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image 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.