1
0
mirror of https://github.com/golang/go synced 2024-11-14 22:50:27 -07:00
The Go programming language
Go to file
Russ Cox bb7a29991c runtime: move whenHeap into heap slice
This CL changes the timer heap from a slice of timers to a slice
of {timer, when} pairs, moving timer.whenHeap into the heap
backing store itself. This makes the ownership clearer (t.whenHeap
was always protected by the heap lock, not the timer's lock)
and also avoids an indirection when doing heap operations,
which look at the when field quite a lot.

goos: linux
goarch: amd64
pkg: time
cpu: AMD Ryzen 9 7950X 16-Core Processor
                                   │  s7base.txt  │                s7.txt                │
                                   │    sec/op    │    sec/op     vs base                │
AdjustTimers10000-32                 244.1µ ±  5%   195.9µ ± 13%  -19.76% (p=0.001 n=10)
AdjustTimers10000SingleThread-32     1.674m ±  6%   1.573m ± 13%   -6.03% (p=0.001 n=10)
AdjustTimers10000NoReset-32          194.0µ ±  2%   170.6µ ±  1%  -12.06% (p=0.000 n=10)
AdjustTimers10000NoSleep-32          223.0µ ±  7%   183.9µ ±  2%  -17.54% (p=0.000 n=10)
AdjustTimers10000NoResetNoSleep-32   181.1µ ±  1%   151.3µ ±  1%  -16.45% (p=0.000 n=10)

goos: darwin
goarch: arm64
pkg: time
cpu: Apple M3 Pro
                                   │ m3base.txt  │               m3.txt                │
                                   │   sec/op    │   sec/op     vs base                │
AdjustTimers10000-12                 266.6µ ± 2%   234.2µ ± 1%  -12.16% (p=0.000 n=10)
AdjustTimers10000SingleThread-12     1.194m ± 0%   1.191m ± 1%   -0.33% (p=0.029 n=10)
AdjustTimers10000NoReset-12          260.9µ ± 2%   239.6µ ± 2%   -8.15% (p=0.000 n=10)
AdjustTimers10000NoSleep-12          247.8µ ± 2%   223.3µ ± 2%   -9.90% (p=0.000 n=10)
AdjustTimers10000NoResetNoSleep-12   231.7µ ± 2%   209.2µ ± 2%   -9.68% (p=0.000 n=10)

Change-Id: I546f077068476d7a7b855889419b292525fb2bc5
Reviewed-on: https://go-review.googlesource.com/c/go/+/574896
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-03-29 14:35:56 +00:00
.github github: switch seen/expected order in issue forms 2024-01-04 23:31:17 +00:00
api Revert "testing: add TB.SetGOMAXPROCS function" 2024-03-22 13:07:36 +00:00
doc Revert "testing: add TB.SetGOMAXPROCS function" 2024-03-22 13:07:36 +00:00
lib/time lib/time: use consistent directory in mkzip usage message 2024-03-04 17:32:07 +00:00
misc misc/wasm: support new wasmtime CLI 2023-11-19 21:11:54 +00:00
src runtime: move whenHeap into heap slice 2024-03-29 14:35:56 +00:00
test cmd/compile: put constants before variables in initialization order 2024-03-28 22:06:51 +00:00
.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 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.