]> Cypherpunks repositories - gostls13.git/commit
runtime: add fast path for (*timers).adjust
authorIan Lance Taylor <iant@golang.org>
Thu, 21 Mar 2024 18:33:24 +0000 (11:33 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 22 Mar 2024 16:33:57 +0000 (16:33 +0000)
commit1c864333cac25273ebfcefa53d50a82c270ebdab
tree314cb0561312e9506d8c76b7ca2f3d27167148fc
parentc2b1463153e0095cf66ca362409d70ff0b6aad26
runtime: add fast path for (*timers).adjust

Affected benchmark results, including new benchmark (some of these may
just be noise, of course):

AdjustTimers10000-12           797.7µ ±  2%   709.6µ ±   2%  -11.04% (p=0.000 n=10)
TickerResetNaive-12            62.69n ±  1%   63.56n ±   1%   +1.40% (p=0.018 n=10)
NowUnixMicro-12                29.95n ±  1%   30.25n ±   4%   +1.00% (p=0.024 n=10)
ParseDuration-12               81.88n ±  0%   81.45n ±   0%   -0.51% (p=0.006 n=10)
UnmarshalText-12               186.9n ±  1%   185.2n ±   1%   -0.88% (p=0.006 n=10)
geomean                        151.8n         151.2n          -0.40%

Change-Id: I3ef8356249c5d703b314498e34ee8095093671c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/573455
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
src/runtime/time.go
src/time/sleep_test.go