]> Cypherpunks repositories - gostls13.git/log
gostls13.git
2 months agocmd/go: add loaderstate as field on `QueryMatchesMainModulesError`
Ian Alexander [Thu, 2 Oct 2025 20:56:19 +0000 (16:56 -0400)]
cmd/go: add loaderstate as field on `QueryMatchesMainModulesError`

This change modifies the type `QueryMatchesMainModulesError` to have
an additional field to store the current module loader state.  The
field is used to break the dependency on the global
`modload.LoaderState` variable.

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: Ia2066fab9f3ec4ffdd3d7393dacdf65c0fd35b92
Reviewed-on: https://go-review.googlesource.com/c/go/+/711118
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: remove module loader state from ccompile
Ian Alexander [Fri, 10 Oct 2025 02:38:37 +0000 (22:38 -0400)]
cmd/go: remove module loader state from ccompile

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: Iff90d83b440b39df3d598f5a999e270baa893e24
Reviewed-on: https://go-review.googlesource.com/c/go/+/711134
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agocmd/go: inject vendor dir into builder struct
Ian Alexander [Fri, 10 Oct 2025 01:01:05 +0000 (21:01 -0400)]
cmd/go: inject vendor dir into builder struct

This change adds a new field to the Builder struct to store a function
to retrieve the current vendor directory.  This allows us to delay the
determination of the vendor directory until later, which is currently
necessary to successful interaction with the module loader state.
This behavior will be changed in a future CL and the Builder field
will then be removed.

In addition, a new method to get the vendor dir from the module loader
state is added that will return the empty string instead of panicing.

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: Ib0165edb9502d98ddfa986acf5579c1b746a026f
Reviewed-on: https://go-review.googlesource.com/c/go/+/711133
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocrypto/pbkdf2: add missing error return value in example
Felix Stein [Thu, 23 Oct 2025 20:27:03 +0000 (20:27 +0000)]
crypto/pbkdf2: add missing error return value in example

This function returns two values, one was missing in the example.

Change-Id: I738597f959011260f666c29b7d3ffad8e5cdc473
GitHub-Last-Rev: 5d99e04f7e1168fd0627e965508181bdb9d1ac25
GitHub-Pull-Request: golang/go#76032
Reviewed-on: https://go-review.googlesource.com/c/go/+/714420
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
2 months agounique: fix inconsistent panic prefix in canonmap cleanup path
mohanson [Wed, 22 Oct 2025 02:37:49 +0000 (10:37 +0800)]
unique: fix inconsistent panic prefix in canonmap cleanup path

Other panic messages in the file use the "unique.canonMap"
prefix, but this one used "internal/sync.HashTrieMap",
looks like it was copied from the "internal/sync" package.

Change-Id: Ic3e85154eb5a593d41c19013d5696afed2178b7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/713660
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
2 months agogo/types, types2: rename Named.resolve to unpack
Mark Freeman [Mon, 20 Oct 2025 21:00:03 +0000 (17:00 -0400)]
go/types, types2: rename Named.resolve to unpack

Named.resolve normalizes a named type's representation so that type
operations have a uniform surface to work with, regardless of how
the type was created.

This often gives the type a heavier footprint, such as when filling
in a lazy-loaded type from UIR, or expanding the RHS of an
instantiated type.

For that reason, it seems more appropriate to call this "unpacking"
the type, as it hints to this heavier form. The term "resolving"
is used in many contexts, and generally suggests that we are
trying to figure out what a name means.

Change-Id: Ia733fd68656380b2be4f7433b7b971b7c1422783
Reviewed-on: https://go-review.googlesource.com/c/go/+/713285
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2 months agogo/types, types2: rename loaded namedState to lazyLoaded
Mark Freeman [Mon, 20 Oct 2025 20:29:44 +0000 (16:29 -0400)]
go/types, types2: rename loaded namedState to lazyLoaded

This is a minor renaming to help differentiate the two kinds of loading
that can happen for named types (eager and lazy).

Use of the term "loaded" suggests that it might also apply to types
which are eagerly-loaded, which is not the case. This change uses
"lazyLoaded" instead to mark this difference.

Change-Id: Iee170024246d9adf3eed978bde2b0500f6d490b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/713282
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agogo/types, types2: rename complete namedState to hasMethods
Mark Freeman [Mon, 20 Oct 2025 19:58:03 +0000 (15:58 -0400)]
go/types, types2: rename complete namedState to hasMethods

The complete namedState tracks whether an instantiated named type has
expanded all of its methods. In the past, this was the terminal state
of a linear lifecycle, and so a term like "complete" made sense.

Now that we've expanded the lifecycle of named types to a tree structure,
the complete namedState is no longer a terminal state, and so the term
"complete" is now a bit confusing.

This change a) makes the expansion aspect of the complete namedState more
explicit and b) removes a misleading suggestion of terminality by changing
the name from complete to hasMethods.

To take a similar naming convention with the underlying namedState, which
signals presence of Named.underlying, we rename the underlying namedState
to hasUnder.

Change-Id: I29fee26efea3de88c7c1240f2dc53df218acf8b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/713280
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agogo/types, types2: set t.underlying exactly once in resolveUnderlying
Mark Freeman [Thu, 23 Oct 2025 16:52:19 +0000 (12:52 -0400)]
go/types, types2: set t.underlying exactly once in resolveUnderlying

While the locking in Named.resolveUnderlying is mostly fine, we do not
perform an atomic read before the write to underlying.

If resolveUnderlying returns and another thread was waiting on the lock,
it can perform a second (in this case identical) write to t.underlying.
A reader thread on n.underlying can thus observe either of those writes,
tripping the race detector.

Michael was kind enough to provide a diagram:

   T1                                   T2
1. t.stateHas(underlying) // false
2.                                      t.stateHas(underlying) // false
3. t.mu.Lock() // acquired
4.                                      t.mu.Lock() // blocked
5. t.underlying = u
6. t.setState(underlying)
7. t.mu.Unlock()
8.                                      t.underlying = u // overwritten
9.                                      t.setState(underlying)
10.                                     t.mu.Unlock()

Adding a second check before setting t.underlying prevents the write on
line 8.

Change-Id: Ia43a6d3ba751caef436b9926c6ece2a71dfb9d38
Reviewed-on: https://go-review.googlesource.com/c/go/+/714300
Auto-Submit: Mark Freeman <markfreeman@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agonet/url: speed up escape and unescape
Julien Cretel [Thu, 23 Oct 2025 16:44:15 +0000 (16:44 +0000)]
net/url: speed up escape and unescape

This change adds a generated 8-bit bitmask for use in functions shouldEscape and ishex.

Function shouldEscape is now inlineable. Function escape is now much faster;
function unescape is a bit faster. Here are some benchmark results (no change
to allocations):

goos: darwin
goarch: amd64
pkg: net/url
cpu: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
                    │     old      │                 new                 │
                    │    sec/op    │   sec/op     vs base                │
QueryEscape/#00-8      58.38n ± 1%   35.98n ± 1%  -38.38% (p=0.000 n=20)
QueryEscape/#01-8     303.50n ± 0%   94.77n ± 0%  -68.77% (p=0.000 n=20)
QueryEscape/#02-8     202.90n ± 0%   78.66n ± 1%  -61.23% (p=0.000 n=20)
QueryEscape/#03-8      444.5n ± 0%   145.9n ± 0%  -67.17% (p=0.000 n=20)
QueryEscape/#04-8     2678.0n ± 0%   913.7n ± 0%  -65.88% (p=0.000 n=20)
PathEscape/#00-8       81.34n ± 0%   44.64n ± 1%  -45.12% (p=0.000 n=20)
PathEscape/#01-8      307.65n ± 0%   96.71n ± 1%  -68.56% (p=0.000 n=20)
PathEscape/#02-8      200.80n ± 1%   78.25n ± 0%  -61.03% (p=0.000 n=20)
PathEscape/#03-8       450.1n ± 1%   145.5n ± 0%  -67.67% (p=0.000 n=20)
PathEscape/#04-8      2663.5n ± 0%   876.5n ± 0%  -67.09% (p=0.000 n=20)
QueryUnescape/#00-8    53.32n ± 1%   51.67n ± 1%   -3.09% (p=0.000 n=20)
QueryUnescape/#01-8    161.0n ± 1%   136.2n ± 1%  -15.40% (p=0.000 n=20)
QueryUnescape/#02-8    126.1n ± 1%   118.3n ± 1%   -6.23% (p=0.000 n=20)
QueryUnescape/#03-8    294.6n ± 0%   273.1n ± 0%   -7.30% (p=0.000 n=20)
QueryUnescape/#04-8    1.511µ ± 0%   1.411µ ± 0%   -6.62% (p=0.000 n=20)
PathUnescape/#00-8     63.84n ± 1%   53.59n ± 1%  -16.05% (p=0.000 n=20)
PathUnescape/#01-8     163.6n ± 3%   137.9n ± 1%  -15.71% (p=0.000 n=20)
PathUnescape/#02-8     126.4n ± 1%   119.1n ± 1%   -5.78% (p=0.000 n=20)
PathUnescape/#03-8     294.2n ± 0%   273.3n ± 0%   -7.12% (p=0.000 n=20)
PathUnescape/#04-8     1.554µ ± 0%   1.417µ ± 0%   -8.78% (p=0.000 n=20)
geomean                277.8n        162.7n       -41.44%

This change draws heavy inspiration from CL 174998, which showed promise but stalled years ago.

Updates #17860

Change-Id: Idcbb1696608998b9e2fc91e1f2a488d8f1f6028c
GitHub-Last-Rev: ff360c2f1b51b1e725d10c0864a6b698d3a5ffc3
GitHub-Pull-Request: golang/go#75914
Reviewed-on: https://go-review.googlesource.com/c/go/+/712200
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Takuto Nagami <logica0419@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2 months agogo/build: use slices.Equal
qiulaidongfeng [Sat, 26 Jul 2025 04:05:17 +0000 (12:05 +0800)]
go/build: use slices.Equal

Change-Id: Id10293b6fe7a5916599fd4684430d694bb8c8920
Reviewed-on: https://go-review.googlesource.com/c/go/+/690615
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>

2 months agoencoding/pem: properly calculate end indexes
Roland Shoemaker [Thu, 23 Oct 2025 15:16:39 +0000 (08:16 -0700)]
encoding/pem: properly calculate end indexes

When a block is missing the END line trailer, calculate the indexes of
the end and end trailer _before_ continuing the loop, making the
reslicing at the start of the loop work as expected.

Change-Id: If45c8cb473315623618f02cc7609f517a72d232d
Reviewed-on: https://go-review.googlesource.com/c/go/+/714200
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd: update golang.org/x/arch for riscv64 disassembler
Joel Sing [Thu, 23 Oct 2025 11:34:36 +0000 (22:34 +1100)]
cmd: update golang.org/x/arch for riscv64 disassembler

Update to a newer version of golang.org/x/arch, in order to bring in
changes to the riscv64 disassembler, including support for vector and
zicond instructions:

  go get golang.org/x/arch@fea4a9e
  go mod tidy
  go mod vendor

Change-Id: I19623f76a63cee7d0f83d9f6c2305554ed5d5efb
Reviewed-on: https://go-review.googlesource.com/c/go/+/714140
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Joel Sing <joel@sing.id.au>

2 months agoall: replace Split in loops with more efficient SplitSeq
cuishuang [Mon, 28 Apr 2025 09:04:20 +0000 (17:04 +0800)]
all: replace Split in loops with more efficient SplitSeq

Find these replacements through https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize.

Change-Id: If88fe0e109b7c7557bfb3d3ffc15271af1ab5856
Reviewed-on: https://go-review.googlesource.com/c/go/+/668437
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
2 months agointernal/goroot: replace HasPrefix+TrimPrefix with CutPrefix
cuishuang [Mon, 28 Apr 2025 09:00:24 +0000 (17:00 +0800)]
internal/goroot: replace HasPrefix+TrimPrefix with CutPrefix

Change-Id: I97305df6babbede57bb0c3b48c89c96cb74307f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/668456
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2 months agostrconv: optimize int-to-decimal and use consistently
Russ Cox [Fri, 17 Oct 2025 04:31:09 +0000 (00:31 -0400)]
strconv: optimize int-to-decimal and use consistently

Integer-to-decimal conversion is hand-written in multiple
places in this package, with different incomplete optimizations
in  different copies. This CL establishes a single implementation,
formatBase10, accurately optimized for a variety of systems,
and then uses it consistently.

Removed the fastSmalls const, which has been true since 2017.
Also renamed smallsString to smalls.

benchmark \ host                    local  linux-arm64       s7  linux-amd64  linux-ppc64le  linux-s390x  linux-arm  s7:GOARCH=386  linux-386
                                  vs base      vs base  vs base      vs base        vs base      vs base    vs base        vs base    vs base
AppendFloat/Decimal                     ~            ~        ~            ~              ~            ~     +0.99%              ~          ~
AppendFloat/Float                       ~            ~        ~       +2.67%              ~            ~     -0.17%              ~          ~
AppendFloat/Exp                         ~            ~        ~            ~         -5.01%       -0.88%     -0.14%              ~          ~
AppendFloat/NegExp                      ~            ~        ~       +1.80%              ~       -1.55%     -0.67%              ~          ~
AppendFloat/LongExp                     ~            ~        ~       -1.36%         -2.34%            ~     +0.41%              ~          ~
AppendFloat/Big                         ~            ~        ~       -3.94%         -2.66%       -0.61%     +1.01%              ~          ~
AppendFloat/BinaryExp              -5.86%       -2.20%   -3.27%      -17.16%         -6.89%            ~    -61.81%        -33.80%    -27.61%
AppendFloat/32Integer                   ~            ~        ~            ~              ~            ~     +0.74%              ~          ~
AppendFloat/32ExactFraction             ~            ~        ~       +2.96%              ~            ~     +0.09%         +1.62%          ~
AppendFloat/32Point                     ~            ~        ~            ~              ~            ~     +1.31%              ~          ~
AppendFloat/32Exp                       ~            ~        ~            ~         -4.05%            ~     -0.05%              ~          ~
AppendFloat/32NegExp                    ~            ~        ~       -0.86%         -4.97%            ~     +0.23%              ~          ~
AppendFloat/32Shortest                  ~            ~        ~            ~              ~            ~     +0.72%              ~          ~
AppendFloat/32Fixed8Hard           +4.58%       +1.94%   +2.77%       -4.39%              ~       +4.39%     -9.36%        -11.97%    -15.71%
AppendFloat/32Fixed9Hard           +4.52%       +5.41%   +4.13%       +3.10%         -4.84%      +14.34%     -3.83%         -1.84%     -6.42%
AppendFloat/64Fixed1               +3.37%       +3.45%   +1.31%            ~         +6.93%       +4.79%     -2.99%         -2.07%     -5.51%
AppendFloat/64Fixed2               +3.44%       +3.46%   +0.80%            ~         +6.03%       +6.51%     -3.07%         -2.23%     -6.47%
AppendFloat/64Fixed3               +5.27%       +3.06%        ~       +2.08%              ~       +6.20%     -2.85%         -3.07%     -6.21%
AppendFloat/64Fixed4               +7.82%       +3.70%   +2.25%       +2.01%         +5.18%       +5.68%     -2.18%         -1.31%     -3.55%
AppendFloat/64Fixed12              +3.81%       +3.67%        ~       +3.91%              ~       +5.71%     -9.49%        -12.13%    -11.63%
AppendFloat/64Fixed16              -6.26%       -1.42%   -3.37%       -3.15%         -2.03%       +1.15%    -16.18%        -21.43%    -20.40%
AppendFloat/64Fixed12Hard               ~       +2.34%   -1.44%            ~         -1.99%       +9.96%    -10.34%        -13.89%    -13.23%
AppendFloat/64Fixed17Hard          -3.86%       -0.96%   -3.23%       -2.85%         -5.54%       +9.12%    -15.76%        -19.37%    -18.01%
AppendFloat/64Fixed18Hard               ~            ~   -1.34%            ~              ~            ~          ~              ~          ~
AppendFloat/Slowpath64                  ~            ~        ~            ~              ~       -0.63%     +0.94%              ~          ~
AppendFloat/SlowpathDenormal64          ~            ~        ~       -0.96%              ~       -0.53%     +0.65%         +1.08%          ~
AppendUint                         -5.10%       +2.64%   -4.21%       -8.75%         -1.69%       -9.73%    -60.54%        -18.30%    -22.34%
AppendUintVarlen/digits=1          +2.91%       +4.79%   -7.80%            ~         +7.60%            ~     -4.13%              ~     +3.56%
AppendUintVarlen/digits=2               ~       -0.36%        ~            ~              ~       +0.99%     -5.45%              ~     +2.71%
AppendUintVarlen/digits=3          -3.69%       -9.19%   -5.28%      -11.24%        -12.90%      -28.62%    -42.12%        -43.20%    -32.72%
AppendUintVarlen/digits=4          -5.18%      -14.79%   -6.11%      -11.44%        -17.82%      -31.59%    -39.66%        -40.86%    -27.99%
AppendUintVarlen/digits=5               ~       -8.76%  -11.18%      -15.73%         -6.94%      -16.84%    -37.31%        -40.43%    -29.18%
AppendUintVarlen/digits=6          -1.48%       -8.18%  -11.67%      -15.29%         -5.74%      -16.51%    -38.73%        -39.42%    -26.00%
AppendUintVarlen/digits=7          -9.34%       -9.38%  -14.86%      -18.42%         -4.30%      -12.42%    -35.23%        -38.90%    -26.84%
AppendUintVarlen/digits=8         -10.37%       -8.50%  -17.32%      -17.57%         -6.52%      -21.17%    -35.56%        -37.64%    -22.88%
AppendUintVarlen/digits=9         -15.94%      -10.40%  -16.51%      -21.68%         -8.14%      -12.55%    -33.50%        -36.50%    -23.86%
AppendUintVarlen/digits=10         -4.16%       +7.58%   -6.11%       -7.51%         -5.73%       -7.21%    -40.04%        -26.20%    -25.59%
AppendUintVarlen/digits=11         -9.66%       -3.38%  -12.55%      -14.52%         -5.92%      -16.85%    -46.87%        -34.70%    -32.89%
AppendUintVarlen/digits=12         -7.75%       +3.13%   -5.16%      -11.19%         -5.28%       -9.87%    -52.39%        -33.95%    -33.40%
AppendUintVarlen/digits=13        -14.43%       -6.62%  -12.24%      -16.02%         -3.26%      -18.73%    -57.28%        -33.80%    -31.58%
AppendUintVarlen/digits=14         -8.62%       +0.74%   -7.87%      -13.63%         -3.57%      -10.55%    -62.94%        -34.30%    -35.06%
AppendUintVarlen/digits=15        -14.52%       -6.86%  -14.08%      -17.37%         -4.55%      -23.38%    -61.99%        -33.33%    -32.28%
AppendUintVarlen/digits=16        -10.77%       -2.06%   -7.70%      -15.64%         -4.43%      -13.30%    -64.95%        -33.08%    -32.25%
AppendUintVarlen/digits=17        -14.18%       -8.84%  -12.96%      -18.62%         -7.55%      -21.40%    -66.71%        -31.96%    -31.40%
AppendUintVarlen/digits=18        -11.04%       -3.66%   -8.43%      -16.19%         -5.77%      -11.42%    -71.09%        -31.44%    -32.31%
AppendUintVarlen/digits=19         -8.62%       +0.33%   -9.66%      -12.56%         -5.37%      -11.96%    -71.30%        -23.09%    -31.52%
AppendUintVarlen/digits=20         -9.26%       +0.36%   -6.55%      -12.95%         -6.83%      -13.41%    -74.49%        -31.80%    -38.76%

host: local
                                 │ 428dc15ab39 │             c6ec0aa13de             │
                                 │   sec/op    │   sec/op     vs base                │
AppendFloat/Decimal-4              40.13n ± 2%   40.15n ± 2%        ~ (p=0.773 n=40)
AppendFloat/Float-4                56.98n ± 1%   57.27n ± 1%        ~ (p=0.394 n=40)
AppendFloat/Exp-4                  61.46n ± 1%   61.52n ± 1%        ~ (p=0.829 n=40)
AppendFloat/NegExp-4               60.24n ± 1%   59.99n ± 2%        ~ (p=0.912 n=40)
AppendFloat/LongExp-4              62.09n ± 2%   62.37n ± 2%        ~ (p=0.394 n=40)
AppendFloat/Big-4                  67.41n ± 1%   66.99n ± 1%        ~ (p=0.292 n=40)
AppendFloat/BinaryExp-4            32.27n ± 2%   30.38n ± 2%   -5.86% (p=0.000 n=40)
AppendFloat/32Integer-4            39.68n ± 1%   39.34n ± 1%        ~ (p=0.233 n=40)
AppendFloat/32ExactFraction-4      57.95n ± 1%   57.88n ± 2%        ~ (p=0.900 n=40)
AppendFloat/32Point-4              56.40n ± 1%   56.58n ± 2%        ~ (p=0.196 n=40)
AppendFloat/32Exp-4                63.12n ± 2%   63.39n ± 1%        ~ (p=0.082 n=40)
AppendFloat/32NegExp-4             59.64n ± 1%   60.29n ± 1%        ~ (p=0.192 n=40)
AppendFloat/32Shortest-4           51.58n ± 1%   51.98n ± 0%        ~ (p=0.082 n=40)
AppendFloat/32Fixed8Hard-4         39.91n ± 1%   41.74n ± 1%   +4.58% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4         43.56n ± 1%   45.53n ± 1%   +4.52% (p=0.000 n=40)
AppendFloat/64Fixed1-4             34.61n ± 2%   35.77n ± 2%   +3.37% (p=0.000 n=40)
AppendFloat/64Fixed2-4             33.91n ± 1%   35.07n ± 1%   +3.44% (p=0.000 n=40)
AppendFloat/64Fixed3-4             35.36n ± 1%   37.23n ± 1%   +5.27% (p=0.000 n=40)
AppendFloat/64Fixed4-4             33.95n ± 1%   36.60n ± 1%   +7.82% (p=0.000 n=40)
AppendFloat/64Fixed12-4            57.03n ± 1%   59.20n ± 2%   +3.81% (p=0.000 n=40)
AppendFloat/64Fixed16-4            51.82n ± 1%   48.58n ± 0%   -6.26% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4        48.32n ± 1%   49.00n ± 0%        ~ (p=0.118 n=40)
AppendFloat/64Fixed17Hard-4        57.40n ± 2%   55.18n ± 5%   -3.86% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4        3.298µ ± 1%   3.291µ ± 1%        ~ (p=0.927 n=40)
AppendFloat/Slowpath64-4           61.94n ± 3%   62.08n ± 3%        ~ (p=0.324 n=40)
AppendFloat/SlowpathDenormal64-4   59.94n ± 1%   59.82n ± 1%        ~ (p=0.288 n=40)
AppendUint-4                       180.6n ± 2%   171.3n ± 2%   -5.10% (p=0.000 n=40)
AppendUintVarlen/digits=1-4        4.475n ± 0%   4.605n ± 0%   +2.91% (p=0.000 n=40)
AppendUintVarlen/digits=2-4        4.424n ± 1%   4.486n ± 1%        ~ (p=0.025 n=40)
AppendUintVarlen/digits=3-4        12.46n ± 4%   12.00n ± 4%   -3.69% (p=0.000 n=40)
AppendUintVarlen/digits=4-4        11.68n ± 2%   11.08n ± 2%   -5.18% (p=0.000 n=40)
AppendUintVarlen/digits=5-4        11.89n ± 0%   11.82n ± 0%        ~ (p=0.001 n=40)
AppendUintVarlen/digits=6-4        12.18n ± 0%   12.00n ± 0%   -1.48% (p=0.000 n=40)
AppendUintVarlen/digits=7-4        13.49n ± 2%   12.23n ± 2%   -9.34% (p=0.000 n=40)
AppendUintVarlen/digits=8-4        13.21n ± 1%   11.84n ± 2%  -10.37% (p=0.000 n=40)
AppendUintVarlen/digits=9-4        15.21n ± 2%   12.79n ± 2%  -15.94% (p=0.000 n=40)
AppendUintVarlen/digits=10-4       15.49n ± 3%   14.85n ± 2%   -4.16% (p=0.000 n=40)
AppendUintVarlen/digits=11-4       16.82n ± 1%   15.20n ± 1%   -9.66% (p=0.000 n=40)
AppendUintVarlen/digits=12-4       17.42n ± 2%   16.07n ± 3%   -7.75% (p=0.000 n=40)
AppendUintVarlen/digits=13-4       18.75n ± 2%   16.05n ± 2%  -14.43% (p=0.000 n=40)
AppendUintVarlen/digits=14-4       18.90n ± 1%   17.27n ± 2%   -8.62% (p=0.000 n=40)
AppendUintVarlen/digits=15-4       20.49n ± 2%   17.52n ± 1%  -14.52% (p=0.000 n=40)
AppendUintVarlen/digits=16-4       21.08n ± 1%   18.81n ± 1%  -10.77% (p=0.000 n=40)
AppendUintVarlen/digits=17-4       22.64n ± 1%   19.43n ± 1%  -14.18% (p=0.000 n=40)
AppendUintVarlen/digits=18-4       22.96n ± 2%   20.42n ± 3%  -11.04% (p=0.000 n=40)
AppendUintVarlen/digits=19-4       24.58n ± 0%   22.46n ± 0%   -8.62% (p=0.000 n=40)
AppendUintVarlen/digits=20-4       25.23n ± 2%   22.89n ± 0%   -9.26% (p=0.000 n=40)
geomean                            33.23n        32.17n        -3.18%

host: linux-arm64
                                 │  428dc15ab39  │              c6ec0aa13de              │
                                 │    sec/op     │    sec/op      vs base                │
AppendFloat/Decimal-4              61.13n ± 0% ¹   61.15n ± 0% ¹        ~ (p=0.006 n=40)
AppendFloat/Float-4                88.90n ± 0% ¹   88.88n ± 0% ¹        ~ (p=0.528 n=40)
AppendFloat/Exp-4                  92.87n ± 0% ¹   92.87n ± 0% ¹        ~ (p=0.795 n=40)
AppendFloat/NegExp-4               93.06n ± 0% ¹   93.10n ± 0% ¹        ~ (p=0.031 n=40)
AppendFloat/LongExp-4              100.3n ± 0% ¹   100.3n ± 0% ¹        ~ (p=0.184 n=40)
AppendFloat/Big-4                  105.5n ± 0% ¹   105.6n ± 0% ¹        ~ (p=0.007 n=40)
AppendFloat/BinaryExp-4            47.80n ± 0% ¹   46.75n ± 0% ¹   -2.20% (p=0.000 n=40)
AppendFloat/32Integer-4            61.24n ± 0% ¹   61.24n ± 0% ¹        ~ (p=0.809 n=40)
AppendFloat/32ExactFraction-4      85.63n ± 0% ¹   85.69n ± 0% ¹        ~ (p=0.002 n=40)
AppendFloat/32Point-4              83.23n ± 0% ¹   83.24n ± 0% ¹        ~ (p=0.410 n=40)
AppendFloat/32Exp-4                92.18n ± 0% ¹   92.19n ± 0% ¹        ~ (p=0.104 n=40)
AppendFloat/32NegExp-4             87.69n ± 0% ¹   87.70n ± 0% ¹        ~ (p=0.106 n=40)
AppendFloat/32Shortest-4           77.13n ± 0% ¹   77.12n ± 0% ¹        ~ (p=0.599 n=40)
AppendFloat/32Fixed8Hard-4         54.55n ± 0% ¹   55.61n ± 0% ¹   +1.94% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4         60.91n ± 0% ¹   64.21n ± 0% ¹   +5.41% (p=0.000 n=40)
AppendFloat/64Fixed1-4             51.37n ± 0% ¹   53.14n ± 0% ¹   +3.45% (p=0.000 n=40)
AppendFloat/64Fixed2-4             50.34n ± 0% ¹   52.08n ± 0% ¹   +3.46% (p=0.000 n=40)
AppendFloat/64Fixed3-4             50.91n ± 0% ¹   52.47n ± 0% ¹   +3.06% (p=0.000 n=40)
AppendFloat/64Fixed4-4             48.59n ± 0% ¹   50.39n ± 0% ¹   +3.70% (p=0.000 n=40)
AppendFloat/64Fixed12-4            81.00n ± 0% ¹   83.98n ± 0% ¹   +3.67% (p=0.000 n=40)
AppendFloat/64Fixed16-4            71.60n ± 0% ¹   70.59n ± 0% ¹   -1.42% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4        66.07n ± 0% ¹   67.62n ± 0% ¹   +2.34% (p=0.000 n=40)
AppendFloat/64Fixed17Hard-4        79.00n ± 0% ¹   78.24n ± 0% ¹   -0.96% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4        4.290µ ± 0% ¹   4.291µ ± 0% ¹        ~ (p=0.674 n=40)
AppendFloat/Slowpath64-4           97.87n ± 0% ¹   97.88n ± 0% ¹        ~ (p=0.847 n=40)
AppendFloat/SlowpathDenormal64-4   95.66n ± 0% ¹   95.66n ± 0% ¹        ~ (p=0.519 n=40)
AppendUint-4                       269.2n ± 0% ¹   276.3n ± 0% ¹   +2.64% (p=0.000 n=40)
AppendUintVarlen/digits=1-4        6.106n ± 0% ¹   6.398n ± 0% ¹   +4.79% (p=0.000 n=40)
AppendUintVarlen/digits=2-4        6.082n ± 0% ¹   6.060n ± 0% ¹   -0.36% (p=0.000 n=40)
AppendUintVarlen/digits=3-4        13.39n ± 0% ¹   12.16n ± 0% ¹   -9.19% (p=0.000 n=40)
AppendUintVarlen/digits=4-4        15.01n ± 0% ¹   12.79n ± 0% ¹  -14.79% (p=0.000 n=40)
AppendUintVarlen/digits=5-4        15.92n ± 0% ¹   14.52n ± 0% ¹   -8.76% (p=0.000 n=40)
AppendUintVarlen/digits=6-4        16.25n ± 0% ¹   14.92n ± 0% ¹   -8.18% (p=0.000 n=40)
AppendUintVarlen/digits=7-4        18.71n ± 0% ¹   16.96n ± 0% ¹   -9.38% (p=0.000 n=40)
AppendUintVarlen/digits=8-4        18.94n ± 0% ¹   17.33n ± 0% ¹   -8.50% (p=0.000 n=40)
AppendUintVarlen/digits=9-4        21.73n ± 0% ¹   19.47n ± 0% ¹  -10.40% (p=0.000 n=40)
AppendUintVarlen/digits=10-4       22.02n ± 0% ¹   23.69n ± 0% ¹   +7.58% (p=0.000 n=40)
AppendUintVarlen/digits=11-4       24.85n ± 0% ¹   24.01n ± 0% ¹   -3.38% (p=0.000 n=40)
AppendUintVarlen/digits=12-4       25.21n ± 0% ¹   26.00n ± 0% ¹   +3.13% (p=0.000 n=40)
AppendUintVarlen/digits=13-4       28.01n ± 0% ¹   26.15n ± 0% ¹   -6.62% (p=0.000 n=40)
AppendUintVarlen/digits=14-4       28.36n ± 0% ¹   28.57n ± 0% ¹   +0.74% (p=0.000 n=40)
AppendUintVarlen/digits=15-4       31.20n ± 0% ¹   29.06n ± 0% ¹   -6.86% (p=0.000 n=40)
AppendUintVarlen/digits=16-4       31.55n ± 0% ¹   30.90n ± 0% ¹   -2.06% (p=0.000 n=40)
AppendUintVarlen/digits=17-4       35.05n ± 0% ¹   31.95n ± 0% ¹   -8.84% (p=0.000 n=40)
AppendUintVarlen/digits=18-4       35.50n ± 0% ¹   34.20n ± 0% ¹   -3.66% (p=0.000 n=40)
AppendUintVarlen/digits=19-4       38.22n ± 0% ¹   38.34n ± 0% ¹   +0.33% (p=0.000 n=40)
AppendUintVarlen/digits=20-4       38.68n ± 0% ¹   38.82n ± 0% ¹   +0.36% (p=0.000 n=40)
geomean                            48.25n          47.59n          -1.36%
¹ benchmarks vary in cpu

host: s7
                                 │ 428dc15ab39  │             c6ec0aa13de             │
                                 │    sec/op    │   sec/op     vs base                │
AppendFloat/Decimal-4               23.81n ± 1%   23.76n ± 1%        ~ (p=0.885 n=40)
AppendFloat/Float-4                 36.85n ± 1%   36.97n ± 1%        ~ (p=0.002 n=40)
AppendFloat/Exp-4                   36.82n ± 1%   36.59n ± 1%        ~ (p=0.292 n=40)
AppendFloat/NegExp-4                37.44n ± 1%   37.41n ± 1%        ~ (p=0.596 n=40)
AppendFloat/LongExp-4               39.82n ± 1%   39.78n ± 1%        ~ (p=0.025 n=40)
AppendFloat/Big-4                   41.94n ± 1%   41.81n ± 1%        ~ (p=0.054 n=40)
AppendFloat/BinaryExp-4             20.18n ± 1%   19.52n ± 0%   -3.27% (p=0.000 n=40)
AppendFloat/32Integer-4             23.88n ± 0%   23.92n ± 0%        ~ (p=0.408 n=40)
AppendFloat/32ExactFraction-4       36.45n ± 1%   36.26n ± 0%        ~ (p=0.088 n=40)
AppendFloat/32Point-4               35.23n ± 1%   35.33n ± 1%        ~ (p=0.470 n=40)
AppendFloat/32Exp-4                 38.04n ± 1%   37.89n ± 1%        ~ (p=0.885 n=40)
AppendFloat/32NegExp-4              36.20n ± 0%   36.21n ± 1%        ~ (p=0.923 n=40)
AppendFloat/32Shortest-4            32.55n ± 0%   32.42n ± 1%        ~ (p=0.238 n=40)
AppendFloat/32Fixed8Hard-4          24.70n ± 0%   25.38n ± 1%   +2.77% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4          27.13n ± 0%   28.25n ± 1%   +4.13% (p=0.000 n=40)
AppendFloat/64Fixed1-4              21.40n ± 0%   21.68n ± 1%   +1.31% (p=0.000 n=40)
AppendFloat/64Fixed2-4              21.17n ± 0%   21.33n ± 1%   +0.80% (p=0.001 n=40)
AppendFloat/64Fixed3-4              22.09n ± 1%   22.29n ± 1%        ~ (p=0.003 n=40)
AppendFloat/64Fixed4-4              21.38n ± 1%   21.86n ± 1%   +2.25% (p=0.000 n=40)
AppendFloat/64Fixed12-4             35.17n ± 0%   35.28n ± 1%        ~ (p=0.125 n=40)
AppendFloat/64Fixed16-4             32.02n ± 1%   30.94n ± 1%   -3.37% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4         29.79n ± 1%   29.36n ± 0%   -1.44% (p=0.000 n=40)
AppendFloat/64Fixed17Hard-4         34.79n ± 1%   33.66n ± 0%   -3.23% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4         1.983µ ± 1%   1.956µ ± 1%   -1.34% (p=0.000 n=40)
AppendFloat/Slowpath64-4            38.15n ± 0%   37.84n ± 1%        ~ (p=0.039 n=40)
AppendFloat/SlowpathDenormal64-4    38.06n ± 1%   38.24n ± 1%        ~ (p=0.025 n=40)
AppendUint-4                        121.0n ± 0%   115.9n ± 1%   -4.21% (p=0.000 n=40)
AppendUintVarlen/digits=1-4         2.557n ± 1%   2.358n ± 4%   -7.80% (p=0.000 n=40)
AppendUintVarlen/digits=2-4         2.387n ± 4%   2.405n ± 4%        ~ (p=0.149 n=40)
AppendUintVarlen/digits=3-4         6.198n ± 1%   5.871n ± 1%   -5.28% (p=0.000 n=40)
AppendUintVarlen/digits=4-4         6.196n ± 0%   5.817n ± 1%   -6.11% (p=0.000 n=40)
AppendUintVarlen/digits=5-4         6.773n ± 1%   6.016n ± 1%  -11.18% (p=0.000 n=40)
AppendUintVarlen/digits=6-4         6.948n ± 1%   6.136n ± 1%  -11.67% (p=0.000 n=40)
AppendUintVarlen/digits=7-4         8.157n ± 1%   6.944n ± 1%  -14.86% (p=0.000 n=40)
AppendUintVarlen/digits=8-4         8.364n ± 1%   6.915n ± 0%  -17.32% (p=0.000 n=40)
AppendUintVarlen/digits=9-4         9.740n ± 1%   8.132n ± 1%  -16.51% (p=0.000 n=40)
AppendUintVarlen/digits=10-4        9.836n ± 1%   9.235n ± 1%   -6.11% (p=0.000 n=40)
AppendUintVarlen/digits=11-4       11.000n ± 1%   9.620n ± 0%  -12.55% (p=0.000 n=40)
AppendUintVarlen/digits=12-4        11.14n ± 1%   10.57n ± 1%   -5.16% (p=0.000 n=40)
AppendUintVarlen/digits=13-4        12.30n ± 1%   10.79n ± 1%  -12.24% (p=0.000 n=40)
AppendUintVarlen/digits=14-4        12.44n ± 1%   11.46n ± 0%   -7.87% (p=0.000 n=40)
AppendUintVarlen/digits=15-4        13.71n ± 1%   11.78n ± 1%  -14.08% (p=0.000 n=40)
AppendUintVarlen/digits=16-4        13.82n ± 1%   12.76n ± 1%   -7.70% (p=0.000 n=40)
AppendUintVarlen/digits=17-4        14.97n ± 1%   13.03n ± 0%  -12.96% (p=0.000 n=40)
AppendUintVarlen/digits=18-4        15.36n ± 1%   14.06n ± 1%   -8.43% (p=0.000 n=40)
AppendUintVarlen/digits=19-4        16.40n ± 1%   14.81n ± 1%   -9.66% (p=0.000 n=40)
AppendUintVarlen/digits=20-4        16.48n ± 0%   15.40n ± 1%   -6.55% (p=0.000 n=40)
geomean                             20.56n        19.65n        -4.42%

host: linux-amd64
                                 │ 428dc15ab39 │             c6ec0aa13de             │
                                 │   sec/op    │   sec/op     vs base                │
AppendFloat/Decimal-4              64.49n ± 0%   64.79n ± 2%        ~ (p=0.169 n=40)
AppendFloat/Float-4                95.98n ± 4%   98.54n ± 4%   +2.67% (p=0.000 n=40)
AppendFloat/Exp-4                  97.10n ± 1%   97.99n ± 4%        ~ (p=0.002 n=40)
AppendFloat/NegExp-4               98.10n ± 0%   99.87n ± 4%   +1.80% (p=0.000 n=40)
AppendFloat/LongExp-4              106.7n ± 4%   105.3n ± 4%   -1.36% (p=0.001 n=40)
AppendFloat/Big-4                  116.8n ± 3%   112.3n ± 4%   -3.94% (p=0.001 n=40)
AppendFloat/BinaryExp-4            57.70n ± 3%   47.79n ± 3%  -17.16% (p=0.000 n=40)
AppendFloat/32Integer-4            64.75n ± 3%   64.71n ± 3%        ~ (p=0.700 n=40)
AppendFloat/32ExactFraction-4      91.48n ± 2%   94.19n ± 3%   +2.96% (p=0.000 n=40)
AppendFloat/32Point-4              92.48n ± 2%   92.73n ± 4%        ~ (p=0.389 n=40)
AppendFloat/32Exp-4                103.6n ± 2%   103.4n ± 1%        ~ (p=0.069 n=40)
AppendFloat/32NegExp-4             95.16n ± 1%   94.33n ± 0%   -0.86% (p=0.001 n=40)
AppendFloat/32Shortest-4           85.43n ± 4%   84.89n ± 1%        ~ (p=0.082 n=40)
AppendFloat/32Fixed8Hard-4         64.42n ± 3%   61.59n ± 0%   -4.39% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4         69.74n ± 3%   71.91n ± 4%   +3.10% (p=0.000 n=40)
AppendFloat/64Fixed1-4             59.70n ± 3%   59.16n ± 4%        ~ (p=0.051 n=40)
AppendFloat/64Fixed2-4             58.73n ± 2%   58.03n ± 0%        ~ (p=0.110 n=40)
AppendFloat/64Fixed3-4             57.92n ± 4%   59.13n ± 4%   +2.08% (p=0.000 n=40)
AppendFloat/64Fixed4-4             55.21n ± 3%   56.33n ± 4%   +2.01% (p=0.000 n=40)
AppendFloat/64Fixed12-4            87.98n ± 3%   91.42n ± 1%   +3.91% (p=0.000 n=40)
AppendFloat/64Fixed16-4            80.05n ± 3%   77.52n ± 4%   -3.15% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4        75.03n ± 4%   74.99n ± 0%        ~ (p=0.641 n=40)
AppendFloat/64Fixed17Hard-4        87.45n ± 1%   84.96n ± 2%   -2.85% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4        4.903µ ± 3%   4.912µ ± 3%        ~ (p=0.829 n=40)
AppendFloat/Slowpath64-4           101.8n ± 1%   101.4n ± 4%        ~ (p=0.268 n=40)
AppendFloat/SlowpathDenormal64-4   101.0n ± 4%   100.1n ± 3%   -0.96% (p=0.000 n=40)
AppendUint-4                       336.7n ± 1%   307.2n ± 0%   -8.75% (p=0.000 n=40)
AppendUintVarlen/digits=1-4        6.069n ± 1%   6.069n ± 1%        ~ (p=0.904 n=40)
AppendUintVarlen/digits=2-4        5.920n ± 3%   5.925n ± 3%        ~ (p=0.010 n=40)
AppendUintVarlen/digits=3-4        16.33n ± 1%   14.49n ± 2%  -11.24% (p=0.000 n=40)
AppendUintVarlen/digits=4-4        16.70n ± 2%   14.79n ± 2%  -11.44% (p=0.000 n=40)
AppendUintVarlen/digits=5-4        19.33n ± 1%   16.29n ± 1%  -15.73% (p=0.000 n=40)
AppendUintVarlen/digits=6-4        20.15n ± 2%   17.07n ± 1%  -15.29% (p=0.000 n=40)
AppendUintVarlen/digits=7-4        22.78n ± 2%   18.58n ± 1%  -18.42% (p=0.000 n=40)
AppendUintVarlen/digits=8-4        23.56n ± 3%   19.43n ± 2%  -17.57% (p=0.000 n=40)
AppendUintVarlen/digits=9-4        27.12n ± 3%   21.24n ± 3%  -21.68% (p=0.000 n=40)
AppendUintVarlen/digits=10-4       27.10n ± 2%   25.07n ± 3%   -7.51% (p=0.000 n=40)
AppendUintVarlen/digits=11-4       29.72n ± 3%   25.41n ± 3%  -14.52% (p=0.000 n=40)
AppendUintVarlen/digits=12-4       30.35n ± 3%   26.95n ± 4%  -11.19% (p=0.000 n=40)
AppendUintVarlen/digits=13-4       32.98n ± 0%   27.70n ± 3%  -16.02% (p=0.000 n=40)
AppendUintVarlen/digits=14-4       33.89n ± 2%   29.28n ± 3%  -13.63% (p=0.000 n=40)
AppendUintVarlen/digits=15-4       36.45n ± 3%   30.11n ± 1%  -17.37% (p=0.000 n=40)
AppendUintVarlen/digits=16-4       37.12n ± 0%   31.31n ± 1%  -15.64% (p=0.000 n=40)
AppendUintVarlen/digits=17-4       39.84n ± 1%   32.42n ± 0%  -18.62% (p=0.000 n=40)
AppendUintVarlen/digits=18-4       40.53n ± 0%   33.97n ± 3%  -16.19% (p=0.000 n=40)
AppendUintVarlen/digits=19-4       43.20n ± 4%   37.78n ± 0%  -12.56% (p=0.000 n=40)
AppendUintVarlen/digits=20-4       43.87n ± 1%   38.19n ± 0%  -12.95% (p=0.000 n=40)
geomean                            54.70n        51.10n        -6.58%

host: linux-ppc64le
                                 │ 428dc15ab39  │             c6ec0aa13de             │
                                 │    sec/op    │   sec/op     vs base                │
AppendFloat/Decimal-4               55.69n ± 3%   56.06n ± 3%        ~ (p=0.821 n=40)
AppendFloat/Float-4                 79.23n ± 1%   77.13n ± 3%        ~ (p=0.019 n=40)
AppendFloat/Exp-4                   91.14n ± 2%   86.58n ± 2%   -5.01% (p=0.000 n=40)
AppendFloat/NegExp-4                90.77n ± 1%   85.43n ± 6%        ~ (p=0.003 n=40)
AppendFloat/LongExp-4               93.40n ± 2%   91.21n ± 2%   -2.34% (p=0.000 n=40)
AppendFloat/Big-4                  101.55n ± 3%   98.84n ± 2%   -2.66% (p=0.000 n=40)
AppendFloat/BinaryExp-4             45.16n ± 3%   42.05n ± 2%   -6.89% (p=0.000 n=40)
AppendFloat/32Integer-4             56.50n ± 3%   57.45n ± 2%        ~ (p=0.821 n=40)
AppendFloat/32ExactFraction-4       80.94n ± 2%   80.60n ± 1%        ~ (p=0.106 n=40)
AppendFloat/32Point-4               77.03n ± 3%   76.69n ± 2%        ~ (p=0.242 n=40)
AppendFloat/32Exp-4                 92.44n ± 1%   88.70n ± 1%   -4.05% (p=0.000 n=40)
AppendFloat/32NegExp-4              89.50n ± 2%   85.06n ± 2%   -4.97% (p=0.000 n=40)
AppendFloat/32Shortest-4            74.63n ± 2%   72.75n ± 4%        ~ (p=0.042 n=40)
AppendFloat/32Fixed8Hard-4          58.18n ± 2%   56.86n ± 1%        ~ (p=0.002 n=40)
AppendFloat/32Fixed9Hard-4          64.17n ± 1%   61.06n ± 1%   -4.84% (p=0.000 n=40)
AppendFloat/64Fixed1-4              47.56n ± 2%   50.86n ± 1%   +6.93% (p=0.000 n=40)
AppendFloat/64Fixed2-4              47.87n ± 4%   50.75n ± 2%   +6.03% (p=0.000 n=40)
AppendFloat/64Fixed3-4              50.84n ± 2%   51.68n ± 1%        ~ (p=0.014 n=40)
AppendFloat/64Fixed4-4              46.29n ± 3%   48.69n ± 4%   +5.18% (p=0.000 n=40)
AppendFloat/64Fixed12-4             79.97n ± 1%   85.03n ± 4%        ~ (p=0.001 n=40)
AppendFloat/64Fixed16-4             73.18n ± 1%   71.70n ± 2%   -2.03% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4         68.41n ± 4%   67.06n ± 1%   -1.99% (p=0.000 n=40)
AppendFloat/64Fixed17Hard-4         81.02n ± 1%   76.54n ± 1%   -5.54% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4         5.184µ ± 0%   5.215µ ± 1%        ~ (p=0.056 n=40)
AppendFloat/Slowpath64-4            89.16n ± 2%   88.85n ± 2%        ~ (p=0.405 n=40)
AppendFloat/SlowpathDenormal64-4    84.27n ± 3%   84.38n ± 1%        ~ (p=0.424 n=40)
AppendUint-4                        277.5n ± 1%   272.9n ± 1%   -1.69% (p=0.000 n=40)
AppendUintVarlen/digits=1-4         5.044n ± 3%   5.428n ± 1%   +7.60% (p=0.000 n=40)
AppendUintVarlen/digits=2-4         5.051n ± 1%   5.038n ± 2%        ~ (p=0.613 n=40)
AppendUintVarlen/digits=3-4         12.13n ± 4%   10.57n ± 2%  -12.90% (p=0.000 n=40)
AppendUintVarlen/digits=4-4         13.33n ± 3%   10.95n ± 1%  -17.82% (p=0.000 n=40)
AppendUintVarlen/digits=5-4         14.05n ± 2%   13.08n ± 3%   -6.94% (p=0.000 n=40)
AppendUintVarlen/digits=6-4         14.46n ± 2%   13.63n ± 2%   -5.74% (p=0.000 n=40)
AppendUintVarlen/digits=7-4         17.11n ± 4%   16.38n ± 1%   -4.30% (p=0.000 n=40)
AppendUintVarlen/digits=8-4         17.34n ± 5%   16.20n ± 1%   -6.52% (p=0.000 n=40)
AppendUintVarlen/digits=9-4         21.06n ± 2%   19.34n ± 2%   -8.14% (p=0.000 n=40)
AppendUintVarlen/digits=10-4        21.11n ± 2%   19.90n ± 1%   -5.73% (p=0.000 n=40)
AppendUintVarlen/digits=11-4        24.25n ± 4%   22.81n ± 1%   -5.92% (p=0.000 n=40)
AppendUintVarlen/digits=12-4        24.53n ± 3%   23.23n ± 2%   -5.28% (p=0.000 n=40)
AppendUintVarlen/digits=13-4        27.14n ± 5%   26.26n ± 1%   -3.26% (p=0.000 n=40)
AppendUintVarlen/digits=14-4        27.72n ± 6%   26.73n ± 0%   -3.57% (p=0.000 n=40)
AppendUintVarlen/digits=15-4        31.23n ± 3%   29.80n ± 1%   -4.55% (p=0.000 n=40)
AppendUintVarlen/digits=16-4        30.78n ± 3%   29.41n ± 1%   -4.43% (p=0.000 n=40)
AppendUintVarlen/digits=17-4        35.04n ± 1%   32.39n ± 0%   -7.55% (p=0.000 n=40)
AppendUintVarlen/digits=18-4        35.10n ± 7%   33.08n ± 0%   -5.77% (p=0.000 n=40)
AppendUintVarlen/digits=19-4        38.26n ± 6%   36.21n ± 0%   -5.37% (p=0.000 n=40)
AppendUintVarlen/digits=20-4        39.24n ± 3%   36.56n ± 0%   -6.83% (p=0.000 n=40)
geomean                             46.39n        44.95n        -3.11%

host: linux-s390x
                                 │  428dc15ab39  │              c6ec0aa13de               │
                                 │    sec/op     │     sec/op      vs base                │
AppendFloat/Decimal-4              70.92n ± 0% ¹    70.81n ± 1% ¹        ~ (p=0.668 n=40)
AppendFloat/Float-4                111.5n ± 0% ¹    111.8n ± 0% ¹        ~ (p=0.143 n=40)
AppendFloat/Exp-4                  119.1n ± 1% ¹    118.1n ± 1% ¹   -0.88% (p=0.000 n=40)
AppendFloat/NegExp-4               119.7n ± 0% ¹    117.8n ± 0% ¹   -1.55% (p=0.000 n=40)
AppendFloat/LongExp-4              128.1n ± 0% ¹    127.8n ± 1% ¹        ~ (p=0.181 n=40)
AppendFloat/Big-4                  131.3n ± 1% ¹    130.5n ± 1% ¹   -0.61% (p=0.001 n=40)
AppendFloat/BinaryExp-4            58.47n ± 0% ¹    58.29n ± 0% ¹        ~ (p=0.189 n=40)
AppendFloat/32Integer-4            72.66n ± 0% ¹    72.31n ± 1% ¹        ~ (p=0.012 n=40)
AppendFloat/32ExactFraction-4      108.6n ± 0% ¹    108.5n ± 1% ¹        ~ (p=0.754 n=40)
AppendFloat/32Point-4              108.6n ± 1% ¹    108.2n ± 0% ¹        ~ (p=0.073 n=40)
AppendFloat/32Exp-4                116.9n ± 1% ¹    117.8n ± 0% ¹        ~ (p=0.008 n=40)
AppendFloat/32NegExp-4             117.9n ± 0% ¹    118.0n ± 0% ¹        ~ (p=0.954 n=40)
AppendFloat/32Shortest-4           107.7n ± 1% ¹    107.0n ± 1% ¹        ~ (p=0.106 n=40)
AppendFloat/32Fixed8Hard-4         71.77n ± 1% ¹    74.92n ± 1% ¹   +4.39% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4         73.49n ± 0% ¹    84.03n ± 0% ¹  +14.34% (p=0.000 n=40)
AppendFloat/64Fixed1-4             63.55n ± 1% ¹    66.59n ± 1% ¹   +4.79% (p=0.000 n=40)
AppendFloat/64Fixed2-4             61.74n ± 1% ¹    65.77n ± 1% ¹   +6.51% (p=0.000 n=40)
AppendFloat/64Fixed3-4             63.84n ± 2% ¹    67.80n ± 1% ¹   +6.20% (p=0.000 n=40)
AppendFloat/64Fixed4-4             60.41n ± 1% ¹    63.84n ± 1% ¹   +5.68% (p=0.000 n=40)
AppendFloat/64Fixed12-4            98.06n ± 0% ¹   103.65n ± 0% ¹   +5.71% (p=0.000 n=40)
AppendFloat/64Fixed16-4            86.71n ± 0% ¹    87.70n ± 0% ¹   +1.15% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4        80.62n ± 1% ¹    88.65n ± 1% ¹   +9.96% (p=0.000 n=40)
AppendFloat/64Fixed17Hard-4        89.77n ± 1% ¹    97.96n ± 1% ¹   +9.12% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4        4.791µ ± 0% ¹    4.790µ ± 0% ¹        ~ (p=0.973 n=40)
AppendFloat/Slowpath64-4           126.0n ± 0% ¹    125.2n ± 0% ¹   -0.63% (p=0.000 n=40)
AppendFloat/SlowpathDenormal64-4   121.7n ± 0% ¹    121.1n ± 0% ¹   -0.53% (p=0.001 n=40)
AppendUint-4                       374.6n ± 1% ¹    338.2n ± 0% ¹   -9.73% (p=0.000 n=40)
AppendUintVarlen/digits=1-4        5.433n ± 0% ¹    5.416n ± 0% ¹        ~ (p=0.032 n=40)
AppendUintVarlen/digits=2-4        5.357n ± 0% ¹    5.410n ± 0% ¹   +0.99% (p=0.000 n=40)
AppendUintVarlen/digits=3-4        17.45n ± 0% ¹    12.46n ± 0% ¹  -28.62% (p=0.000 n=40)
AppendUintVarlen/digits=4-4        17.38n ± 0% ¹    11.89n ± 0% ¹  -31.59% (p=0.000 n=40)
AppendUintVarlen/digits=5-4        21.38n ± 0% ¹    17.78n ± 1% ¹  -16.84% (p=0.000 n=40)
AppendUintVarlen/digits=6-4        21.60n ± 0% ¹    18.03n ± 1% ¹  -16.51% (p=0.000 n=40)
AppendUintVarlen/digits=7-4        26.44n ± 0% ¹    23.15n ± 0% ¹  -12.42% (p=0.000 n=40)
AppendUintVarlen/digits=8-4        26.60n ± 0% ¹    20.97n ± 1% ¹  -21.17% (p=0.000 n=40)
AppendUintVarlen/digits=9-4        31.44n ± 0% ¹    27.49n ± 0% ¹  -12.55% (p=0.000 n=40)
AppendUintVarlen/digits=10-4       31.26n ± 1% ¹    29.00n ± 0% ¹   -7.21% (p=0.000 n=40)
AppendUintVarlen/digits=11-4       35.90n ± 0% ¹    29.84n ± 0% ¹  -16.85% (p=0.000 n=40)
AppendUintVarlen/digits=12-4       35.95n ± 0% ¹    32.40n ± 0% ¹   -9.87% (p=0.000 n=40)
AppendUintVarlen/digits=13-4       40.98n ± 0% ¹    33.31n ± 0% ¹  -18.73% (p=0.000 n=40)
AppendUintVarlen/digits=14-4       38.96n ± 0% ¹    34.85n ± 0% ¹  -10.55% (p=0.000 n=40)
AppendUintVarlen/digits=15-4       45.51n ± 0% ¹    34.87n ± 0% ¹  -23.38% (p=0.000 n=40)
AppendUintVarlen/digits=16-4       45.05n ± 0% ¹    39.05n ± 0% ¹  -13.30% (p=0.000 n=40)
AppendUintVarlen/digits=17-4       50.76n ± 0% ¹    39.89n ± 0% ¹  -21.40% (p=0.000 n=40)
AppendUintVarlen/digits=18-4       49.86n ± 1% ¹    44.16n ± 0% ¹  -11.42% (p=0.000 n=40)
AppendUintVarlen/digits=19-4       54.68n ± 0% ¹    48.14n ± 0% ¹  -11.96% (p=0.000 n=40)
AppendUintVarlen/digits=20-4       55.48n ± 0% ¹    48.04n ± 0% ¹  -13.41% (p=0.000 n=40)
geomean                            62.00n           58.40n          -5.80%
¹ benchmarks vary in cpu

host: linux-arm
                                 │ 428dc15ab39  │             c6ec0aa13de             │
                                 │    sec/op    │   sec/op     vs base                │
AppendFloat/Decimal-4               121.6n ± 0%   122.8n ± 0%   +0.99% (p=0.000 n=40)
AppendFloat/Float-4                 209.1n ± 0%   208.8n ± 0%   -0.17% (p=0.000 n=40)
AppendFloat/Exp-4                   208.8n ± 0%   208.5n ± 0%   -0.14% (p=0.000 n=40)
AppendFloat/NegExp-4                210.1n ± 0%   208.7n ± 0%   -0.67% (p=0.000 n=40)
AppendFloat/LongExp-4               217.5n ± 0%   218.4n ± 0%   +0.41% (p=0.000 n=40)
AppendFloat/Big-4                   237.8n ± 0%   240.2n ± 0%   +1.01% (p=0.000 n=40)
AppendFloat/BinaryExp-4            226.90n ± 0%   86.66n ± 0%  -61.81% (p=0.000 n=40)
AppendFloat/32Integer-4             121.9n ± 0%   122.8n ± 0%   +0.74% (p=0.000 n=40)
AppendFloat/32ExactFraction-4       174.0n ± 0%   174.1n ± 0%   +0.09% (p=0.000 n=40)
AppendFloat/32Point-4               171.9n ± 0%   174.2n ± 0%   +1.31% (p=0.000 n=40)
AppendFloat/32Exp-4                 195.4n ± 0%   195.3n ± 0%   -0.05% (p=0.000 n=40)
AppendFloat/32NegExp-4              174.0n ± 0%   174.4n ± 0%   +0.23% (p=0.000 n=40)
AppendFloat/32Shortest-4            167.5n ± 0%   168.7n ± 0%   +0.72% (p=0.000 n=40)
AppendFloat/32Fixed8Hard-4          115.4n ± 0%   104.6n ± 0%   -9.36% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4          144.9n ± 0%   139.3n ± 0%   -3.83% (p=0.000 n=40)
AppendFloat/64Fixed1-4              127.3n ± 0%   123.5n ± 0%   -2.99% (p=0.000 n=40)
AppendFloat/64Fixed2-4              123.6n ± 0%   119.8n ± 0%   -3.07% (p=0.000 n=40)
AppendFloat/64Fixed3-4              122.8n ± 0%   119.3n ± 0%   -2.85% (p=0.000 n=40)
AppendFloat/64Fixed4-4              114.5n ± 0%   112.0n ± 0%   -2.18% (p=0.000 n=40)
AppendFloat/64Fixed12-4             161.3n ± 0%   146.0n ± 0%   -9.49% (p=0.000 n=40)
AppendFloat/64Fixed16-4             168.7n ± 0%   141.4n ± 0%  -16.18% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4         152.3n ± 0%   136.6n ± 0%  -10.34% (p=0.000 n=40)
AppendFloat/64Fixed17Hard-4         182.7n ± 0%   153.9n ± 0%  -15.76% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4         7.976µ ± 0%   7.977µ ± 0%        ~ (p=0.093 n=40)
AppendFloat/Slowpath64-4            213.4n ± 0%   215.4n ± 0%   +0.94% (p=0.000 n=40)
AppendFloat/SlowpathDenormal64-4    214.0n ± 0%   215.4n ± 0%   +0.65% (p=0.000 n=40)
AppendUint-4                       1526.0n ± 0%   602.1n ± 0%  -60.54% (p=0.000 n=40)
AppendUintVarlen/digits=1-4         9.338n ± 0%   8.953n ± 0%   -4.13% (p=0.000 n=40)
AppendUintVarlen/digits=2-4         9.789n ± 0%   9.256n ± 0%   -5.45% (p=0.000 n=40)
AppendUintVarlen/digits=3-4         46.42n ± 0%   26.87n ± 0%  -42.12% (p=0.000 n=40)
AppendUintVarlen/digits=4-4         49.23n ± 0%   29.70n ± 0%  -39.66% (p=0.000 n=40)
AppendUintVarlen/digits=5-4         51.45n ± 0%   32.25n ± 0%  -37.31% (p=0.000 n=40)
AppendUintVarlen/digits=6-4         51.02n ± 0%   31.26n ± 0%  -38.73% (p=0.000 n=40)
AppendUintVarlen/digits=7-4         55.45n ± 0%   35.91n ± 0%  -35.23% (p=0.000 n=40)
AppendUintVarlen/digits=8-4         57.11n ± 0%   36.80n ± 0%  -35.56% (p=0.000 n=40)
AppendUintVarlen/digits=9-4         59.28n ± 0%   39.42n ± 0%  -33.50% (p=0.000 n=40)
AppendUintVarlen/digits=10-4        71.62n ± 0%   42.94n ± 0%  -40.04% (p=0.000 n=40)
AppendUintVarlen/digits=11-4        91.41n ± 0%   48.57n ± 0%  -46.87% (p=0.000 n=40)
AppendUintVarlen/digits=12-4       106.50n ± 0%   50.70n ± 0%  -52.39% (p=0.000 n=40)
AppendUintVarlen/digits=13-4       121.90n ± 0%   52.07n ± 0%  -57.28% (p=0.000 n=40)
AppendUintVarlen/digits=14-4       129.70n ± 0%   48.07n ± 0%  -62.94% (p=0.000 n=40)
AppendUintVarlen/digits=15-4       148.50n ± 0%   56.45n ± 0%  -61.99% (p=0.000 n=40)
AppendUintVarlen/digits=16-4       167.40n ± 0%   58.67n ± 0%  -64.95% (p=0.000 n=40)
AppendUintVarlen/digits=17-4       179.70n ± 0%   59.83n ± 0%  -66.71% (p=0.000 n=40)
AppendUintVarlen/digits=18-4       186.00n ± 0%   53.78n ± 0%  -71.09% (p=0.000 n=40)
AppendUintVarlen/digits=19-4       216.50n ± 0%   62.13n ± 0%  -71.30% (p=0.000 n=40)
AppendUintVarlen/digits=20-4       246.80n ± 0%   62.96n ± 0%  -74.49% (p=0.000 n=40)
geomean                             136.3n        95.52n       -29.95%

host: s7:GOARCH=386
                                 │ 428dc15ab39  │             c6ec0aa13de              │
                                 │    sec/op    │    sec/op     vs base                │
AppendFloat/Decimal-4               51.07n ± 1%    51.05n ± 0%        ~ (p=0.346 n=40)
AppendFloat/Float-4                 94.44n ± 1%    95.05n ± 0%        ~ (p=0.343 n=40)
AppendFloat/Exp-4                   97.89n ± 0%    98.59n ± 0%        ~ (p=0.271 n=40)
AppendFloat/NegExp-4                98.22n ± 1%    99.27n ± 0%        ~ (p=0.283 n=40)
AppendFloat/LongExp-4               100.3n ± 0%    101.4n ± 0%        ~ (p=0.001 n=40)
AppendFloat/Big-4                   109.1n ± 0%    110.0n ± 1%        ~ (p=0.141 n=40)
AppendFloat/BinaryExp-4             53.98n ± 1%    35.74n ± 1%  -33.80% (p=0.000 n=40)
AppendFloat/32Integer-4             49.90n ± 0%    50.41n ± 0%        ~ (p=0.005 n=40)
AppendFloat/32ExactFraction-4       78.22n ± 0%    79.49n ± 0%   +1.62% (p=0.000 n=40)
AppendFloat/32Point-4               75.75n ± 1%    75.90n ± 0%        ~ (p=0.119 n=40)
AppendFloat/32Exp-4                 89.74n ± 1%    90.58n ± 0%        ~ (p=0.088 n=40)
AppendFloat/32NegExp-4              79.34n ± 1%    80.22n ± 0%        ~ (p=0.005 n=40)
AppendFloat/32Shortest-4            74.46n ± 1%    74.43n ± 1%        ~ (p=1.000 n=40)
AppendFloat/32Fixed8Hard-4          47.28n ± 1%    41.62n ± 0%  -11.97% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4          64.92n ± 1%    63.72n ± 1%   -1.84% (p=0.000 n=40)
AppendFloat/64Fixed1-4              58.40n ± 1%    57.19n ± 1%   -2.07% (p=0.000 n=40)
AppendFloat/64Fixed2-4              55.79n ± 1%    54.55n ± 1%   -2.23% (p=0.000 n=40)
AppendFloat/64Fixed3-4              56.70n ± 1%    54.95n ± 0%   -3.07% (p=0.000 n=40)
AppendFloat/64Fixed4-4              51.85n ± 1%    51.18n ± 0%   -1.31% (p=0.000 n=40)
AppendFloat/64Fixed12-4             74.00n ± 0%    65.02n ± 0%  -12.13% (p=0.000 n=40)
AppendFloat/64Fixed16-4             80.23n ± 1%    63.04n ± 0%  -21.43% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4         70.64n ± 1%    60.83n ± 1%  -13.89% (p=0.000 n=40)
AppendFloat/64Fixed17Hard-4         86.02n ± 1%    69.36n ± 0%  -19.37% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4         3.736µ ± 1%    3.795µ ± 0%        ~ (p=0.010 n=40)
AppendFloat/Slowpath64-4            99.18n ± 1%   100.25n ± 0%        ~ (p=0.003 n=40)
AppendFloat/SlowpathDenormal64-4    97.35n ± 1%    98.41n ± 0%   +1.08% (p=0.001 n=40)
AppendUint-4                        356.3n ± 1%    291.2n ± 0%  -18.30% (p=0.000 n=40)
AppendUintVarlen/digits=1-4         3.923n ± 0%    3.919n ± 1%        ~ (p=0.061 n=40)
AppendUintVarlen/digits=2-4         3.917n ± 1%    3.924n ± 0%        ~ (p=0.048 n=40)
AppendUintVarlen/digits=3-4        17.205n ± 0%    9.772n ± 0%  -43.20% (p=0.000 n=40)
AppendUintVarlen/digits=4-4         17.18n ± 0%    10.16n ± 1%  -40.86% (p=0.000 n=40)
AppendUintVarlen/digits=5-4         18.33n ± 1%    10.92n ± 0%  -40.43% (p=0.000 n=40)
AppendUintVarlen/digits=6-4         18.67n ± 1%    11.31n ± 0%  -39.42% (p=0.000 n=40)
AppendUintVarlen/digits=7-4         19.77n ± 1%    12.08n ± 0%  -38.90% (p=0.000 n=40)
AppendUintVarlen/digits=8-4         19.95n ± 1%    12.44n ± 1%  -37.64% (p=0.000 n=40)
AppendUintVarlen/digits=9-4         21.44n ± 1%    13.61n ± 1%  -36.50% (p=0.000 n=40)
AppendUintVarlen/digits=10-4        24.31n ± 0%    17.94n ± 0%  -26.20% (p=0.000 n=40)
AppendUintVarlen/digits=11-4        27.75n ± 1%    18.12n ± 0%  -34.70% (p=0.000 n=40)
AppendUintVarlen/digits=12-4        28.76n ± 1%    18.99n ± 0%  -33.95% (p=0.000 n=40)
AppendUintVarlen/digits=13-4        29.12n ± 1%    19.28n ± 0%  -33.80% (p=0.000 n=40)
AppendUintVarlen/digits=14-4        30.56n ± 0%    20.07n ± 1%  -34.30% (p=0.000 n=40)
AppendUintVarlen/digits=15-4        30.71n ± 1%    20.48n ± 0%  -33.33% (p=0.000 n=40)
AppendUintVarlen/digits=16-4        31.86n ± 0%    21.32n ± 0%  -33.08% (p=0.000 n=40)
AppendUintVarlen/digits=17-4        31.51n ± 1%    21.43n ± 1%  -31.96% (p=0.000 n=40)
AppendUintVarlen/digits=18-4        32.46n ± 0%    22.26n ± 1%  -31.44% (p=0.000 n=40)
AppendUintVarlen/digits=19-4        35.42n ± 1%    27.25n ± 1%  -23.09% (p=0.000 n=40)
AppendUintVarlen/digits=20-4        39.50n ± 2%    26.94n ± 1%  -31.80% (p=0.000 n=40)
geomean                             48.59n         39.98n       -17.73%

host: linux-386
                                 │ 428dc15ab39  │             c6ec0aa13de             │
                                 │    sec/op    │   sec/op     vs base                │
AppendFloat/Decimal-4               148.4n ± 2%   147.8n ± 1%        ~ (p=0.053 n=40)
AppendFloat/Float-4                 284.1n ± 2%   281.9n ± 1%        ~ (p=0.001 n=40)
AppendFloat/Exp-4                   294.5n ± 3%   292.7n ± 1%        ~ (p=0.035 n=40)
AppendFloat/NegExp-4                295.4n ± 1%   295.9n ± 3%        ~ (p=0.799 n=40)
AppendFloat/LongExp-4               305.8n ± 2%   304.9n ± 2%        ~ (p=0.186 n=40)
AppendFloat/Big-4                   340.1n ± 3%   340.8n ± 4%        ~ (p=0.069 n=40)
AppendFloat/BinaryExp-4             139.1n ± 0%   100.7n ± 1%  -27.61% (p=0.000 n=40)
AppendFloat/32Integer-4             149.2n ± 2%   148.4n ± 3%        ~ (p=0.450 n=40)
AppendFloat/32ExactFraction-4       247.1n ± 4%   249.9n ± 3%        ~ (p=0.005 n=40)
AppendFloat/32Point-4               231.5n ± 4%   233.9n ± 2%        ~ (p=0.288 n=40)
AppendFloat/32Exp-4                 286.9n ± 3%   284.5n ± 0%        ~ (p=0.015 n=40)
AppendFloat/32NegExp-4              244.5n ± 1%   244.3n ± 4%        ~ (p=0.637 n=40)
AppendFloat/32Shortest-4            227.4n ± 0%   227.2n ± 1%        ~ (p=0.161 n=40)
AppendFloat/32Fixed8Hard-4          146.8n ± 1%   123.7n ± 2%  -15.71% (p=0.000 n=40)
AppendFloat/32Fixed9Hard-4          218.7n ± 3%   204.7n ± 1%   -6.42% (p=0.000 n=40)
AppendFloat/64Fixed1-4              194.3n ± 0%   183.7n ± 3%   -5.51% (p=0.000 n=40)
AppendFloat/64Fixed2-4              184.8n ± 1%   172.8n ± 0%   -6.47% (p=0.000 n=40)
AppendFloat/64Fixed3-4              186.1n ± 3%   174.6n ± 3%   -6.21% (p=0.000 n=40)
AppendFloat/64Fixed4-4              164.9n ± 3%   159.1n ± 3%   -3.55% (p=0.000 n=40)
AppendFloat/64Fixed12-4             233.9n ± 2%   206.7n ± 3%  -11.63% (p=0.000 n=40)
AppendFloat/64Fixed16-4             253.2n ± 4%   201.5n ± 1%  -20.40% (p=0.000 n=40)
AppendFloat/64Fixed12Hard-4         224.0n ± 1%   194.4n ± 1%  -13.23% (p=0.000 n=40)
AppendFloat/64Fixed17Hard-4         282.4n ± 2%   231.5n ± 4%  -18.01% (p=0.000 n=40)
AppendFloat/64Fixed18Hard-4         15.92µ ± 3%   15.73µ ± 2%        ~ (p=0.172 n=40)
AppendFloat/Slowpath64-4            305.2n ± 2%   300.0n ± 3%        ~ (p=0.016 n=40)
AppendFloat/SlowpathDenormal64-4    297.1n ± 2%   294.0n ± 1%        ~ (p=0.075 n=40)
AppendUint-4                       1218.5n ± 1%   946.2n ± 1%  -22.34% (p=0.000 n=40)
AppendUintVarlen/digits=1-4         8.735n ± 2%   9.046n ± 3%   +3.56% (p=0.000 n=40)
AppendUintVarlen/digits=2-4         8.752n ± 1%   8.990n ± 1%   +2.71% (p=0.000 n=40)
AppendUintVarlen/digits=3-4         32.45n ± 2%   21.84n ± 1%  -32.72% (p=0.000 n=40)
AppendUintVarlen/digits=4-4         33.23n ± 1%   23.93n ± 3%  -27.99% (p=0.000 n=40)
AppendUintVarlen/digits=5-4         39.00n ± 3%   27.61n ± 2%  -29.18% (p=0.000 n=40)
AppendUintVarlen/digits=6-4         38.87n ± 2%   28.76n ± 2%  -26.00% (p=0.000 n=40)
AppendUintVarlen/digits=7-4         42.55n ± 1%   31.13n ± 3%  -26.84% (p=0.000 n=40)
AppendUintVarlen/digits=8-4         43.13n ± 3%   33.26n ± 1%  -22.88% (p=0.000 n=40)
AppendUintVarlen/digits=9-4         48.54n ± 3%   36.96n ± 1%  -23.86% (p=0.000 n=40)
AppendUintVarlen/digits=10-4        68.81n ± 1%   51.20n ± 1%  -25.59% (p=0.000 n=40)
AppendUintVarlen/digits=11-4        78.96n ± 1%   52.99n ± 1%  -32.89% (p=0.000 n=40)
AppendUintVarlen/digits=12-4        83.14n ± 2%   55.37n ± 2%  -33.40% (p=0.000 n=40)
AppendUintVarlen/digits=13-4        83.74n ± 1%   57.30n ± 2%  -31.58% (p=0.000 n=40)
AppendUintVarlen/digits=14-4        90.47n ± 1%   58.75n ± 3%  -35.06% (p=0.000 n=40)
AppendUintVarlen/digits=15-4        90.35n ± 3%   61.18n ± 1%  -32.28% (p=0.000 n=40)
AppendUintVarlen/digits=16-4        94.12n ± 1%   63.77n ± 2%  -32.25% (p=0.000 n=40)
AppendUintVarlen/digits=17-4        93.81n ± 0%   64.35n ± 3%  -31.40% (p=0.000 n=40)
AppendUintVarlen/digits=18-4        99.25n ± 1%   67.18n ± 3%  -32.31% (p=0.000 n=40)
AppendUintVarlen/digits=19-4       118.70n ± 0%   81.28n ± 1%  -31.52% (p=0.000 n=40)
AppendUintVarlen/digits=20-4       135.90n ± 1%   83.23n ± 1%  -38.76% (p=0.000 n=40)
geomean                             140.3n        117.7n       -16.12%

Change-Id: If5e2151c397701b23dbc69f20e57b99728898e90
Reviewed-on: https://go-review.googlesource.com/c/go/+/712662
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
2 months agocmd/internal/obj/riscv: simplify validation and encoding of raw instructions
Joel Sing [Tue, 9 Sep 2025 15:09:41 +0000 (01:09 +1000)]
cmd/internal/obj/riscv: simplify validation and encoding of raw instructions

Use wantImmU/immU rather than handrolling the same code. This also corrects
the validation output - add tests to ensure this is the case.

Change-Id: Id48f459c7c0de09ddde7a10506f66a3a269f325f
Reviewed-on: https://go-review.googlesource.com/c/go/+/702396
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 months agodoc/next: improve new(expr) release note
Alan Donovan [Wed, 22 Oct 2025 21:56:32 +0000 (17:56 -0400)]
doc/next: improve new(expr) release note

One reader pointed out that the example isn't compelling because
&age would have worked just as well. This CL changes the example
to use a nontrivial expression. Don't nitpick the arithmetic.

For #45624

Change-Id: Icc745f5ee7000c1d3559da1388c6a5596c4d1f46
Reviewed-on: https://go-review.googlesource.com/c/go/+/714040
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2 months agoruntime: cleanup pagetrace
Florian Lehner [Mon, 20 Oct 2025 18:09:21 +0000 (20:09 +0200)]
runtime: cleanup pagetrace

pagetrace functionality was removed with CL 583379.

Change-Id: I8e8718e6cf5415e326ec127fb294588866ee4e6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/713260
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2 months agocrypto/internal/fips140test: add entropy SHA2-384 testing
Daniel McCarney [Fri, 3 Oct 2025 15:20:48 +0000 (11:20 -0400)]
crypto/internal/fips140test: add entropy SHA2-384 testing

The crypto/internal/fips140/entropy package vendors a minimal
implementation of SHA2-384 to insulate it from changes in the FIPS
module implementation. This means it also requires ACVP testing separate
from the FIPS module implementation. This commit implements the
required ACVP testing support.

There's no way via the ACVP protocol, or acvptool, to specify that we
want to test a specific SHA2-384 implementation compared to normal. We
use a new environment variable (GOENTROPYSOURCEACVP=1) to make that
distinction.

The capabilities we advertise when testing the entropy SHA2-384
implementation are limited to something that best describes the
input sizes that the entropy module's implementation supports within the
requirements imposed by ACVP. We allow 144 byte messages (3*digest size)
to support MCT and in particular the "standard" MCT algorithm, and allow
1024 byte messages as the production supported message size used by the
entropy module itself.

Change-Id: I6e693a3fa23efba35d8a7d029ddf0b11036621c3
Reviewed-on: https://go-review.googlesource.com/c/go/+/711740
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2 months agoruntime/cgo: fix cgoCheckArg description
Ariel Otilibili [Wed, 22 Oct 2025 08:36:51 +0000 (08:36 +0000)]
runtime/cgo: fix cgoCheckArg description

The description is misleading: cgoCheckArg is called by both
cgoCheckPointer and cgoCheckResult.

Mention cgoCheckResult in the cgoCheckArg description. Remove extra
spaces between words.

For #75856

Change-Id: I6780cda76b5cb7b4f9af3fbaa37a6c5099cc8d7d
GitHub-Last-Rev: 531928b679ab138bf9bfe47a1bf6470d582776f3
GitHub-Pull-Request: golang/go#75992
Reviewed-on: https://go-review.googlesource.com/c/go/+/713520
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2 months agoruntime: use backoff and ISB instruction to reduce contention in (*lfstack).pop and...
fanzha02 [Tue, 14 Jan 2025 09:32:56 +0000 (09:32 +0000)]
runtime: use backoff and ISB instruction to reduce contention in (*lfstack).pop and (*spanSet).pop on arm64

When profiling CPU usage LiveKit on AArch64/x86 (AWS), the graphs show
CPU spikes that was repeating in a semi-periodic manner and spikes occur
when the GC(garbage collector) is active.

Our analysis found that the getempty function accounted for 10.54% of the
overhead, which was mainly caused by the work.empty.pop() function. And
listing pop shows that the majority of the time, with a 10.29% overhead,
is spent on atomic.Cas64((*uint64)(head), old, next).

This patch adds a backoff approach to reduce the high overhead of the
atomic operation primarily occurs when contention over a specific memory
address increases, typically with the rise in the number of threads.

Note that on paltforms other than arm64, the initial value of backoff is zero.

This patch rewrites the implementation of procyield() on arm64, which is an
Armv8.0-A compatible delay function using the counter-timer.

The garbage collector benchmark:

                           │    master       │               opt                        │
                           │   sec/op        │        sec/op     vs base                │
Garbage/benchmem-MB=64-160   3.782m ± 4%        2.264m ± 2%      -40.12% (p=0.000 n=10)
                           │ user+sys-sec/op │ user+sys-sec/op   vs base                │
Garbage/benchmem-MB=64-160   433.5m ± 4%        255.4m ± 2%      -41.08% (p=0.000 n=10)

Reference for backoff mechianism:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/multi-threaded-applications-arm

Change-Id: Ie8128a2243ceacbb82ab2a88941acbb8428bad94
Reviewed-on: https://go-review.googlesource.com/c/go/+/654895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2 months agostrconv: clean up powers-of-10 table, tests
Russ Cox [Wed, 15 Oct 2025 03:24:19 +0000 (23:24 -0400)]
strconv: clean up powers-of-10 table, tests

Both Eisel-Lemire and Ryu depend on a table of
truncated 128-bit mantissas of powers of 10,
and so will Dragonbox.

This CL:
 - Moves the table to a separate file, so it doesn't look tied to Eisel-Lemire.
 - Introduces a uint128 type in math.go for the table values,
   since .Hi and .Lo are clearer than [1] and [0].
 - Generates the table from a standalone generator pow10gen.go.
 - Adds a new pow10 function in math.go to handle table access details.
 - Factors a 64x128->192-bit multiply into umul192 in math.go.
 - Moves multiplication by log₁₀ 2 and log₂ 10 into math.go.
 - Introduces an import_test.go to avoid having to type differently
   cased names in test code versus regular code.
 - Introduces named constants for the floating-point size parameters.
   Previously these were only in the floatInfo global variables.
 - Changes the BenchmarkAppendUintVarlen subtest names
   to be more useful.

Change-Id: I9826ee5f41c5c19be3b6a7c3c5f277ec6c23b39a
Reviewed-on: https://go-review.googlesource.com/c/go/+/712661
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2 months agocmd/go: check if build output should overwrite files with renames
Sean Liao [Sun, 19 Oct 2025 19:00:55 +0000 (20:00 +0100)]
cmd/go: check if build output should overwrite files with renames

CopyFile has a check to ensure that only object files are overwritten.
Extend this to moveOrCopyFile, so the check also happens when the source
and destination file are on the same filesystem (when renames are a
valid way of moving files).

Fixes #75970

Change-Id: Ie667301f1c9c00b114cfd91cdf8053ac20fd817b
Reviewed-on: https://go-review.googlesource.com/c/go/+/712960
Reviewed-by: Laurent Demailly <ldemailly@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Ian Alexander <jitsu@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocomment: change slice to string in function comment/help
redteampanda-ng [Wed, 22 Oct 2025 06:38:55 +0000 (06:38 +0000)]
comment: change slice to string in function comment/help

Comment is outdated, it should say a string is returned

Change-Id: I7d40135aac22845dbc1f91e02e5776cc7d58eda7
GitHub-Last-Rev: 08ee556f0803dc0e2a765d431ac10758b4f26146
GitHub-Pull-Request: golang/go#75980
Reviewed-on: https://go-review.googlesource.com/c/go/+/713040
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Keith Randall <khr@google.com>
2 months agogo/types, types2: simplify locking in Named.resolveUnderlying
Robert Griesemer [Tue, 21 Oct 2025 22:04:46 +0000 (15:04 -0700)]
go/types, types2: simplify locking in Named.resolveUnderlying

Avoid calling Named.resolveUnderlying in the first place (there
is only one caller) if Named.underlying exists already.

In Named.resolveUnderlying remove initial atomic check because
of the check in Named.Underlying. Also, remove a 2nd atomic
check after acquiring the lock as it likely won't help much.

Change-Id: Ife87218fa2549d0903a10218f4dd7a70f85d6c7c
Reviewed-on: https://go-review.googlesource.com/c/go/+/713521
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
2 months agogo/types, types2: in resolveUnderlying, only compute path when needed
Robert Griesemer [Mon, 20 Oct 2025 17:25:23 +0000 (10:25 -0700)]
go/types, types2: in resolveUnderlying, only compute path when needed

When following a RHS chain, the (TypeName) Object path is only needed
when there is a cycle (i.e., an error), in which case we can be slow.
Rather than always compute the path, only compute it in the error case.
In the same vain, allocate the seen map lazily, only when needed.

This code could use a test (it doesn't seem to be encountered by our
test suite), but I haven't found a case to provoke the error yet.

Change-Id: Iff6313394442a251adc56580f746928ec13450fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/712321
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2 months agogo/types, types2: rename Named.under to Named.resolveUnderlying
Robert Griesemer [Thu, 16 Oct 2025 23:58:25 +0000 (16:58 -0700)]
go/types, types2: rename Named.under to Named.resolveUnderlying

Named.resolveUnderlying is now just a helper function for Underlying
and only called from there. The name makes is clearer what this function
does; it also doesn't need to return a result anymore.

While at it, slightly simplify the function body.

Change-Id: I167c4be89b1bfcc69f6b528ddb6ed4c90481194a
Reviewed-on: https://go-review.googlesource.com/c/go/+/712521
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2 months agogo/build, cmd/go: use ast.ParseDirective for go:embed
Austin Clements [Thu, 11 Sep 2025 20:17:45 +0000 (16:17 -0400)]
go/build, cmd/go: use ast.ParseDirective for go:embed

Currently, "//go:embed" directives are read by bespoke parsers in
go/build and cmd/go/internal/modindex. Replace these bespoke parsers
with scanner.Scanner for finding these directives and
ast.ParseDirective for parsing them.

It's not clear why we had a bespoke parser just for finding
"//go:embed" directives in the first place. We have a bespoke parser
for reading imports in order to avoid having to read the entire source
file into memory, but if we're parsing embeds, we wind up reading the
entire source file into memory anyway. Using scanner.Scanner instead
eliminates some truly confusing code.

This also demonstrates that ast.ParseDirective as proposed in #68021
achieves useful API coverage.

Updates #68021.

Change-Id: Ieb68738121dcff605a6a704a8045ddd2ff35df35
Reviewed-on: https://go-review.googlesource.com/c/go/+/704836
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
2 months agogo/ast: add ParseDirective for parsing directive comments
Austin Clements [Fri, 29 Aug 2025 01:40:57 +0000 (21:40 -0400)]
go/ast: add ParseDirective for parsing directive comments

This adds an ast.Directive API for parsing directive comments such as
"//go:build" and "//go:embed".

This will help tools standardize the syntax of these directive
comments. Even within the standard Go tools there's little agreement
on the finer details of the syntax of directives today.

Fixes #68021.

Change-Id: I84a988a667682c9ac70632df6e925461ac95e381
Reviewed-on: https://go-review.googlesource.com/c/go/+/704835
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
2 months agogo/types, types2: only report version errors if new(expr) is ok otherwise
Robert Griesemer [Mon, 20 Oct 2025 22:02:23 +0000 (15:02 -0700)]
go/types, types2: only report version errors if new(expr) is ok otherwise

If new(expr) is used before Go 1.26, don't report version errors if there
are other problems with the expression.

While at it, implement multiple missing type checks for new(expr) and
add corresponding test cases that were missed in CL 704935 (tests for
no value expressions, generic types, untyped nil).

Reorganize/rename builtins0.go tests for new to match existing test case
patterns again.

Fixes #75986.
For #45624.

Change-Id: I39e5516d3f8d191cc390a4d8b9911c312bbb177c
Reviewed-on: https://go-review.googlesource.com/c/go/+/713241
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>

2 months agopath/filepath: reword documentation for Rel
Matt T. Proud [Thu, 16 Oct 2025 17:14:45 +0000 (19:14 +0200)]
path/filepath: reword documentation for Rel

The existing func Rel's API documentation was presented in a rather
dense way without a lot of organization that oriented around topical
flow, so the documentation has been cleaned up to present the
function's behavior more clearly and concisely.

Fixes #75893

Change-Id: I6c8f6ef508250397be9d0127a15508e7335f18c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/712440
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2 months agogo/types, types2: guard Named.underlying with Named.mu
Mark Freeman [Fri, 17 Oct 2025 17:16:34 +0000 (13:16 -0400)]
go/types, types2: guard Named.underlying with Named.mu

It appears that CL 695977 introduced a data race on Named.underlying.
This fixes that race by specifying a new namedState called underlying,
which, perhaps unsurprisingly, signals that Named.underlying is populated.

Unfortunately, the underlying namedState is independent of the complete
namedState (unsurprising since methods and the underlying type are not related).

Hence, they cannot be ordered and thus do not fit the current integer-based
state representation. To account for combinations of states, we introduce a
bit set representation for namedState instead. The namedState field is also
renamed to stateMask to reflect this new representation.

Methods that operate on the stateMask are adjusted and exposition is added
throughout.

Fixes #75963

Change-Id: Icfa188ea2fa7916804c06f80668e99176bf4e978
Reviewed-on: https://go-review.googlesource.com/c/go/+/712720
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2 months agoruntime,syscall: implement and use syscalln on darwin
qmuntal [Tue, 26 Aug 2025 14:20:56 +0000 (16:20 +0200)]
runtime,syscall: implement and use syscalln on darwin

All darwin syscall implementations can be consolidated into a
single syscalln function, as already happens on Windows.

This reduces duplication and allows moving some logic from
runtime to syscall.

Updates #699135

Cq-Include-Trybots: luci.golang.try:gotip-darwin-arm64-longtest,gotip-darwin-amd64-longtest,x_sys-gotip-darwin-arm64-longtest,x_sys-gotip-darwin-amd64-longtest
Change-Id: If5de80442b1d4a1123258401a3ae21695e7c8f6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/699177
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2 months agoall: gofmt -w
Jes Cok [Tue, 21 Oct 2025 17:25:19 +0000 (17:25 +0000)]
all: gofmt -w

Change-Id: Iae74ac910d9db035bb2b726b2128aac09f5b7aae
GitHub-Last-Rev: 7aab5fa8e76df87766e903d7a689ed257d986558
GitHub-Pull-Request: golang/go#75993
Reviewed-on: https://go-review.googlesource.com/c/go/+/713540
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: David Chase <drchase@google.com>
2 months agostrconv: embed testdata in test
Russ Cox [Fri, 17 Oct 2025 03:21:14 +0000 (23:21 -0400)]
strconv: embed testdata in test

This makes it easier to run test binaries on remote machines.

Change-Id: I3e5bc6cf10272a6743fd5d16ab1089d46f53232c
Reviewed-on: https://go-review.googlesource.com/c/go/+/712660
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agosync: re-enable race even when panicking
Nicolas Hillegeer [Tue, 21 Oct 2025 11:43:36 +0000 (04:43 -0700)]
sync: re-enable race even when panicking

Not doing this can cause user code running after this panic (e.g.:
defers) to produce non-existing races.

Change-Id: Ia6aec88aaeee3b9c17e7b8019d697ffa88dfb492
Reviewed-on: https://go-review.googlesource.com/c/go/+/713460
Commit-Queue: Nicolas Hillegeer <aktau@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Nicolas Hillegeer <aktau@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agosyscall: use rawSyscall6 to call ptrace in forkAndExecInChild
qmuntal [Thu, 2 Oct 2025 13:12:30 +0000 (15:12 +0200)]
syscall: use rawSyscall6 to call ptrace in forkAndExecInChild

On darwin and openbsd, the autogenerated ptrace wrapper is
nosplit because it is called from forkAndExecInChild.

This makes it difficult to modify and improve the underlying
syscall mechanism, as ptrace is almost over the nosplit limit.

We better call ptrace directly using rawSyscall6 in
forkAndExecInChild so that we can lift the ptrace nosplit
restriction to.

Doing so also fixes a long-standing inconsistency:
forkAndExecInChild is documented to only allow rawSyscall, but
the ptrace wrapper is using non-raw syscalls.

Updates #64113

Change-Id: Ibbbb218511561c1a5cb5b6d288a691f9738b14a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/708575
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agoruntime: use timer_settime64 on 32-bit Linux
abdullahkiani007 [Sat, 18 Oct 2025 14:43:53 +0000 (14:43 +0000)]
runtime: use timer_settime64 on 32-bit Linux

Linux introduced new syscalls to fix the year 2038 issue.
To still be able to use the old ones, the Kconfig option
COMPAT_32BIT_TIME would be necessary.

Use the new 64-bit syscall for timer_settime by default.
Add a fallback to use the 32-bit syscall when the
64-bit version returns _ENOSYS.

Fixes #75133

Change-Id: Iccb8831b67f665067ee526e93c3ff2f4f5392edf
GitHub-Last-Rev: 6c3d62d60e5ff02ebe61e56e06d6365e530ec39e
GitHub-Pull-Request: golang/go#75957
Reviewed-on: https://go-review.googlesource.com/c/go/+/712642
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>

2 months agoos: support deleting read-only files in RemoveAll on older Windows versions
qmuntal [Tue, 21 Oct 2025 14:14:03 +0000 (16:14 +0200)]
os: support deleting read-only files in RemoveAll on older Windows versions

The Windows implementation of RemoveAll supports deleting read-only
files only on file systems that supports POSIX semantics and on
newer Windows versions (Windows 10 RS5 and latter).

For all the other cases, the read-only bit was not clearer before
deleting read-only files, so they fail to delete.

Note that this case was supported prior to CL 75922, which landed on
Go 1.25.

Fixes #75922

Change-Id: Id6e6477f42e1952d08318ca3e4ab7c1648969f66
Reviewed-on: https://go-review.googlesource.com/c/go/+/713480
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>

2 months agocmd/compile/internal/ssa: fix typo in comment
Jes Cok [Mon, 20 Oct 2025 16:18:42 +0000 (16:18 +0000)]
cmd/compile/internal/ssa: fix typo in comment

Change-Id: Ic48a756b71a62be1c6c4cfe781c02b89010e2338
GitHub-Last-Rev: 8c0d89b475c204af66d528799713276c57da16f8
GitHub-Pull-Request: golang/go#75985
Reviewed-on: https://go-review.googlesource.com/c/go/+/713041
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocrypto/internal/fips140/entropy: increase AllocsPerRun iterations
qmuntal [Fri, 17 Oct 2025 10:40:05 +0000 (12:40 +0200)]
crypto/internal/fips140/entropy: increase AllocsPerRun iterations

TestNISTECAllocations is flaky (~1% failure rate) on my local Windows
machine since CL 710058, which touched TestEntropyRace.

These tests are unrelated, but some allocations might be incorrectly
accounted to TestNISTECAllocations, affecting the end result due to
the low number of iterations done in that test.

Change-Id: I01323c2a45b12665e86d940467f4f91c2e66696b
Reviewed-on: https://go-review.googlesource.com/c/go/+/712620
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go/testdata/script: disable list_empty_importpath test on Windows
matloob [Mon, 20 Oct 2025 17:51:13 +0000 (13:51 -0400)]
cmd/go/testdata/script: disable list_empty_importpath test on Windows

The test is flaking on windows, and I haven't been able to figure out
why. For now, to unblock folks, just allow the value that occasionally
appears: 'no errors' to avoid having a broken test. This seems like it's
probably a race though so we should fix it as soon as we can.

For #73976

Change-Id: I6a6a696431d784d048ed798b828a759e752b6393
Reviewed-on: https://go-review.googlesource.com/c/go/+/713220
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agoall: eliminate unnecessary type conversions
Jes Cok [Sun, 19 Oct 2025 19:53:27 +0000 (19:53 +0000)]
all: eliminate unnecessary type conversions

Found by github.com/mdempsky/unconvert

Change-Id: I88ce10390a49ba768a4deaa0df9057c93c1164de
GitHub-Last-Rev: 3b0f7e8f74f58340637f33287c238765856b2483
GitHub-Pull-Request: golang/go#75974
Reviewed-on: https://go-review.googlesource.com/c/go/+/712940
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
2 months agocmd/internal/obj/ppc64: improve large prologue generation
Paul Murphy [Wed, 8 Oct 2025 19:34:09 +0000 (14:34 -0500)]
cmd/internal/obj/ppc64: improve large prologue generation

Avoid needing an unsafe section to store LR and adjust SP
for large constants by using the stdux (MOVDU) instruction.

This is also a few instructions shorter as the large
constant adjustment is only created once.

Change-Id: I6ff7a24181cdadb1846a33129fc148dcf59b76d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/710197
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/compile: leave the horses alone
Jorropo [Sat, 18 Oct 2025 06:34:24 +0000 (08:34 +0200)]
cmd/compile: leave the horses alone

I don't know why we were eliminating horses, this not cool.

Change-Id: I0d4b5a1b2f584e071de0a85ef88f9baf9183e12e
Reviewed-on: https://go-review.googlesource.com/c/go/+/712820
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
2 months agoruntime: clean dead architectures from go:build constraint
Jorropo [Fri, 17 Oct 2025 17:51:53 +0000 (19:51 +0200)]
runtime: clean dead architectures from go:build constraint

I've didn't caught theses while reviewing CL 701615.

Change-Id: I721978c173a255eb6d7c3e43dea2b903a9fd016d
Reviewed-on: https://go-review.googlesource.com/c/go/+/712740
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2 months agocrypto/internal/fips140/entropy: move to crypto/internal/entropy/v1.0.0
Filippo Valsorda [Wed, 8 Oct 2025 11:15:27 +0000 (13:15 +0200)]
crypto/internal/fips140/entropy: move to crypto/internal/entropy/v1.0.0

The lab confirmed the that entropy source doesn't have to be inside the
module boundary, although changing the entropy source of a module does
require recertification.

Move the v1.0.0 entropy source out of crypto/internal/fips140, to a
versioned path that lets us keep multiple versions (which would be used
by different modules) if we wish to.

Change-Id: I6a6a69647e9dfca1c375650a0869bdc001d65173
Reviewed-on: https://go-review.googlesource.com/c/go/+/710057
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2 months agoruntime: save lasx and lsx registers in loong64 async preemption
Guoqi Chen [Thu, 11 Sep 2025 08:21:44 +0000 (16:21 +0800)]
runtime: save lasx and lsx registers in loong64 async preemption

This is a port of CL 669195 and CL 695916 adjusted to save loong64
lasx and lsx registers off stack.

Change-Id: Ie56787c76259a9545f5a8adcb09f588c8451bbd6
Reviewed-on: https://go-review.googlesource.com/c/go/+/711180
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
2 months agoruntime: make procyieldAsm no longer loop infinitely if passed 0
Michael Anthony Knyszek [Fri, 17 Oct 2025 20:02:55 +0000 (20:02 +0000)]
runtime: make procyieldAsm no longer loop infinitely if passed 0

Change-Id: I9f01692373623687e09bee54efebaac0ee361f81
Reviewed-on: https://go-review.googlesource.com/c/go/+/712664
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agoruntime: wrap procyield assembly and check for 0
Michael Anthony Knyszek [Fri, 17 Oct 2025 19:53:36 +0000 (19:53 +0000)]
runtime: wrap procyield assembly and check for 0

procyield will currently loop infinitely if passed 0 on several
platforms. This change sidesteps this bug by renaming procyield to
procyieldAsm, and adding a wrapper named procyield that checks for
cycles == 0. The benefit of this structure is that procyield called
with a constant cycle count of 0 will be inlined and constant folded
away, the expected behavior of a procyield of 0 cycles.

A follow-up change will fix the assembly to not have this footgun
anymore.

Change-Id: I7068abfeb961bc0fa475e216836f7c0e46b38373
Reviewed-on: https://go-review.googlesource.com/c/go/+/712663
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>

2 months agoruntime/trace: dump test traces on validation failure
Michael Anthony Knyszek [Thu, 9 Oct 2025 20:30:18 +0000 (20:30 +0000)]
runtime/trace: dump test traces on validation failure

We currently dump traces for internal/trace tests on validation failure,
but not for the runtime/trace package.

This change moves some of the machinery to do this into the testtrace
package and then uses it from the runtime/trace package.

For #75665.

Change-Id: Ibe2d4f3945c1fd21dcbccf56820865f8d2ea41f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/710755
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agonet/url: reduce allocs in Encode
Julien Cretel [Sat, 18 Oct 2025 19:33:12 +0000 (19:33 +0000)]
net/url: reduce allocs in Encode

This change adds benchmarks for Encode and reverts what CL 617356 did in
this package. At the moment, using maps.Keys in conjunction with
slices.Sorted indeed causes a bunch of closures to escape to heap.
Moreover, all other things being equal, pre-sizing the slice in which
we collect the keys is beneficial to performance when they are "many" (>8)
keys because it results in fewer allocations than if we don't pre-size the
slice.

Here are some benchmark results:

goos: darwin
goarch: amd64
pkg: net/url
cpu: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
                                                           │     old      │                 new                 │
                                                           │    sec/op    │   sec/op     vs base                │
EncodeQuery/#00-8                                             2.051n ± 1%   2.343n ± 1%  +14.24% (p=0.000 n=20)
EncodeQuery/#01-8                                             2.337n ± 1%   2.458n ± 4%   +5.16% (p=0.000 n=20)
EncodeQuery/oe=utf8&q=puppies-8                               489.6n ± 0%   284.5n ± 0%  -41.88% (p=0.000 n=20)
EncodeQuery/q=dogs&q=%26&q=7-8                                397.2n ± 1%   231.7n ± 1%  -41.66% (p=0.000 n=20)
EncodeQuery/a=a1&a=a2&a=a3&b=b1&b=b2&b=b3&c=c1&c=c2&c=c3-8    743.1n ± 0%   519.0n ± 0%  -30.16% (p=0.000 n=20)
EncodeQuery/a=a&b=b&c=c&d=d&e=e&f=f&g=g&h=h&i=i-8            1324.0n ± 0%   931.0n ± 0%  -29.68% (p=0.000 n=20)
geomean                                                       98.57n        75.38n       -23.53%

                                                           │      old      │                 new                  │
                                                           │     B/op      │    B/op     vs base                  │
EncodeQuery/#00-8                                             0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=20) ¹
EncodeQuery/#01-8                                             0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=20) ¹
EncodeQuery/oe=utf8&q=puppies-8                              168.00 ± 0%     56.00 ± 0%  -66.67% (p=0.000 n=20)
EncodeQuery/q=dogs&q=%26&q=7-8                               112.00 ± 0%     32.00 ± 0%  -71.43% (p=0.000 n=20)
EncodeQuery/a=a1&a=a2&a=a3&b=b1&b=b2&b=b3&c=c1&c=c2&c=c3-8    296.0 ± 0%     168.0 ± 0%  -43.24% (p=0.000 n=20)
EncodeQuery/a=a&b=b&c=c&d=d&e=e&f=f&g=g&h=h&i=i-8             680.0 ± 0%     264.0 ± 0%  -61.18% (p=0.000 n=20)
geomean                                                                  ²               -47.48%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                                           │      old      │                 new                  │
                                                           │   allocs/op   │ allocs/op   vs base                  │
EncodeQuery/#00-8                                             0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=20) ¹
EncodeQuery/#01-8                                             0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=20) ¹
EncodeQuery/oe=utf8&q=puppies-8                               8.000 ± 0%     3.000 ± 0%  -62.50% (p=0.000 n=20)
EncodeQuery/q=dogs&q=%26&q=7-8                                7.000 ± 0%     3.000 ± 0%  -57.14% (p=0.000 n=20)
EncodeQuery/a=a1&a=a2&a=a3&b=b1&b=b2&b=b3&c=c1&c=c2&c=c3-8   10.000 ± 0%     5.000 ± 0%  -50.00% (p=0.000 n=20)
EncodeQuery/a=a&b=b&c=c&d=d&e=e&f=f&g=g&h=h&i=i-8            12.000 ± 0%     5.000 ± 0%  -58.33% (p=0.000 n=20)
geomean                                                                  ²               -43.23%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

Change-Id: Ia0d7579f90434f0546d93b680ab18b47a1ffbdac
GitHub-Last-Rev: f25be71e070c2c2f3a2587eea872ca52f3533c40
GitHub-Pull-Request: golang/go#75874
Reviewed-on: https://go-review.googlesource.com/c/go/+/711280
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: t hepudds <thepudds1460@gmail.com>
2 months agocmd/asm: fix typo in comment
Joel Sing [Mon, 20 Oct 2025 04:33:50 +0000 (15:33 +1100)]
cmd/asm: fix typo in comment

Change-Id: I1a7933bce70bcae1f93a45c6810da60d269f48f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/713000
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Joel Sing <joel@sing.id.au>

2 months agoruntime: fix generation skew with trace reentrancy
Michael Anthony Knyszek [Tue, 30 Sep 2025 23:54:07 +0000 (23:54 +0000)]
runtime: fix generation skew with trace reentrancy

Currently when performing multiple nested traceAcquires, we re-read
trace.gen on subsequent reads. But this is invalid, since a generation
transition may happen in between a traceAcquire and a nested
traceAcquire. The first one will produce a traceLocker with a gen from
the previous generation, and the second will produce a traceLocker from
the next generation. (Note: generations cannot _complete_ advancement
under traceAcquire, but trace.gen can move forward.) The end result is
earlier events, from the nested traceAcquire, will write to a future
generation, and then previous events will write to a past generation.
This can break the trace.

(There are also a lot of comments left over talking about the
non-reentrancy of the tracer; we should look at those again.)

Change-Id: I08ac8cc86d41ab3e6061c5de58d657b6ad0d19d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/708397
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2 months agoruntime: add _Gdeadextra status
Michael Anthony Knyszek [Mon, 3 Feb 2025 15:22:37 +0000 (15:22 +0000)]
runtime: add _Gdeadextra status

_Gdeadextra is almost the same as _Gdead but for goroutines attached to
extra Ms. The primary difference is that it can be transitioned into a
_Gscan status, unlike _Gdead. (Why not just use _Gdead? For safety,
mostly. There's exactly one case where we're going to want to transition
_Gdead to _Gscan|_Gdead, and it's for extra Ms. It's also a bit weird to
call this state dead when it can still have a syscalling P attached to
it.)

This status is used in a follow-up change that changes entersyscall and
exitsyscall.

Change-Id: I169a4c8617aa3dc329574b829203f56c86b58169
Reviewed-on: https://go-review.googlesource.com/c/go/+/646197
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: inject loaderstate into matcher function
Ian Alexander [Thu, 2 Oct 2025 18:45:23 +0000 (14:45 -0400)]
cmd/go: inject loaderstate into matcher function

This change alters the matcher function in vendorPkg in order to
retrieve the go version from the current loaderstate.

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: Iedb12bdfe4ab3c24dbbf161db1f3842014415c59
Reviewed-on: https://go-review.googlesource.com/c/go/+/711117
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agocmd/go: inject State parameter into `work.runInstall`
Ian Alexander [Wed, 8 Oct 2025 19:05:14 +0000 (15:05 -0400)]
cmd/go: inject State parameter into `work.runInstall`

This command modifies the call tree starting at `work.runInstall` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/work
rf 'inject modload.LoaderState runInstall'
cd ..
./rf-cleanup.zsh

Change-Id: I038d2c4870d67835c165852b223eaad3e2496202
Reviewed-on: https://go-review.googlesource.com/c/go/+/710304
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: inject State parameter into `work.runBuild`
Ian Alexander [Fri, 3 Oct 2025 21:05:08 +0000 (17:05 -0400)]
cmd/go: inject State parameter into `work.runBuild`

This command modifies the call tree starting at `work.runBuild` and
`work.runInstall` to inject a `State` parameter to every function that
is currently using the global `modload.LoaderState` variable.  By
explicilty passing a `State` parameter, we can begin to eliminate the
usage of the global `modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/work
rf 'inject modload.LoaderState runBuild'
cd ..
./rf-cleanup.zsh
 # cd work
 # rf 'inject modload.LoaderState runInstall'
 # cd ..
 # ./rf-cleanup.zsh

Change-Id: I232452d877211d4ac72f42aa193b30dab9649481
Reviewed-on: https://go-review.googlesource.com/c/go/+/709990
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agocmd/go: inject State parameter into `workcmd.runSync`
Ian Alexander [Thu, 2 Oct 2025 21:00:18 +0000 (17:00 -0400)]
cmd/go: inject State parameter into `workcmd.runSync`

This command modifies the call tree starting at `workcmd.runSync` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/workcmd
rf 'inject modload.LoaderState runSync'
cd ..
./rf-cleanup.zsh

Change-Id: Ib8a7b332b89762a7463ace53243cae6aa0ffcc2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/709987
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: inject State parameter into `modget.runGet`
Ian Alexander [Wed, 1 Oct 2025 21:45:25 +0000 (17:45 -0400)]
cmd/go: inject State parameter into `modget.runGet`

This command modifies the call tree starting at `modget.runGet` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/modget
rf 'inject modload.LoaderState runGet'
cd ..
./rf-cleanup.zsh

Change-Id: Icafc5cff07c49809f5c199feec9ed7795536976c
Reviewed-on: https://go-review.googlesource.com/c/go/+/709981
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: inject State parameter into `modcmd.runVerify`
Ian Alexander [Thu, 2 Oct 2025 03:21:21 +0000 (23:21 -0400)]
cmd/go: inject State parameter into `modcmd.runVerify`

This command modifies the call tree starting at `modcmd.runVerify` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/modcmd
rf 'inject modload.LoaderState runVerify'
cd ..
./rf-cleanup.zsh

Change-Id: I5b3b4670a4e2d19375049e585035145d14248b40
Reviewed-on: https://go-review.googlesource.com/c/go/+/709985
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: inject State parameter into `modcmd.runVendor`
Ian Alexander [Thu, 2 Oct 2025 03:18:10 +0000 (23:18 -0400)]
cmd/go: inject State parameter into `modcmd.runVendor`

This command modifies the call tree starting at `modcmd.runVendor` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/modcmd
rf 'inject modload.LoaderState runVendor'
cd ..
./rf-cleanup.zsh

Change-Id: I0572e165d291e34d212ded9a420871688b7915ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/709984
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: inject State parameter into `modcmd.runInit`
Ian Alexander [Thu, 2 Oct 2025 03:04:06 +0000 (23:04 -0400)]
cmd/go: inject State parameter into `modcmd.runInit`

This command modifies the call tree starting at `modcmd.runInit` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/modcmd
rf 'inject modload.LoaderState runInit'
cd ..
./rf-cleanup.zsh

Change-Id: Ie8bb8eb0edc2fabceafd9c41a2b11fe2a3532b73
Reviewed-on: https://go-review.googlesource.com/c/go/+/709983
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agocmd/go: inject State parameter into `modcmd.runDownload`
Ian Alexander [Wed, 8 Oct 2025 18:51:13 +0000 (14:51 -0400)]
cmd/go: inject State parameter into `modcmd.runDownload`

This command modifies the call tree starting at `modcmd.runDownload`
to inject a `State` parameter to every function that is currently
using the global `modload.LoaderState` variable.  By explicilty
passing a `State` parameter, we can begin to eliminate the usage of
the global `modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/modcmd
rf 'inject modload.LoaderState runDownload'
cd ..
./rf-cleanup.zsh

Change-Id: I64cce3e631a2614b7fabe49205d9d41fc9ba24de
Reviewed-on: https://go-review.googlesource.com/c/go/+/710299
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: inject State parameter into `toolchain.Select`
Ian Alexander [Fri, 3 Oct 2025 01:45:53 +0000 (21:45 -0400)]
cmd/go: inject State parameter into `toolchain.Select`

This command modifies the call tree starting at `toolchain.Select` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/toolchain
rf '
  inject modload.LoaderState Select
  add select.go var moduleLoaderState *modload.State
  ex {
    import "cmd/go/internal/modload";
    modload.LoaderState -> moduleLoaderState
  }
  add Select://+0 moduleLoaderState := modload.NewState()
  rm select.go:/var moduleLoaderState \*modload.State/
'
cd ..
./rf-cleanup.zsh

Change-Id: I759439a47e2b1aaa01a0a800bc18596dd7ce4983
Reviewed-on: https://go-review.googlesource.com/c/go/+/709988
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: add loaderstate to Switcher
Ian Alexander [Thu, 16 Oct 2025 21:43:58 +0000 (17:43 -0400)]
cmd/go: add loaderstate to Switcher

Temporarily add modload.State field to the Switcher implementation.
Note that we cannot modify the gover.Switcher interface because doing
so creates an import cycle.

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: I20dba76328aa3d0df58caff75b174522bf9df9d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/712703
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: convert functions to methods
Ian Alexander [Thu, 16 Oct 2025 22:15:14 +0000 (18:15 -0400)]
cmd/go: convert functions to methods

This commit converts the Reset and setState functions to methods.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/modload
rf '
  mv setState State.setState
  mv Reset State.Reset
'

Change-Id: Ibc40071dc044ef5d1ab0a0b03f17b75243a42011
Reviewed-on: https://go-review.googlesource.com/c/go/+/712702
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agocmd/go: make Reset work with any State instance
Ian Alexander [Thu, 16 Oct 2025 22:09:57 +0000 (18:09 -0400)]
cmd/go: make Reset work with any State instance

This commit updates the Reset function to work with any state
object in preparation for converting it to a method.

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: I6103842ea0a0528698217930afc0e34a2aa21eea
Reviewed-on: https://go-review.googlesource.com/c/go/+/712701
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: make setState work with any State instance
Ian Alexander [Thu, 16 Oct 2025 22:06:27 +0000 (18:06 -0400)]
cmd/go: make setState work with any State instance

This commit updates the setState function to work with any state
object in preparation for converting it to a method.

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: I6d485156e7c4c83ff608f941b68e6d928418bd8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/712700
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: inject State parameter into `tool.runTool`
Ian Alexander [Wed, 8 Oct 2025 18:58:18 +0000 (14:58 -0400)]
cmd/go: inject State parameter into `tool.runTool`

This command modifies the call tree starting at `tool.runTool` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/tool
rf 'inject modload.LoaderState runTool'
cd ..
./rf-cleanup.zsh

Change-Id: Icd1ce189f7dad421eaa2bd43d53ceaf443c5405e
Reviewed-on: https://go-review.googlesource.com/c/go/+/710302
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agocmd/go: inject State parameter into `test.runTest`
Ian Alexander [Thu, 2 Oct 2025 13:43:40 +0000 (09:43 -0400)]
cmd/go: inject State parameter into `test.runTest`

This command modifies the call tree starting at `test.runTest` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/test
rf 'inject modload.LoaderState runTest'
cd ..
./rf-cleanup.zsh

Change-Id: I6ee495c3beabdc5568ad338f4998a5927491db1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/709986
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: inject State parameter into `list.runList`
Ian Alexander [Wed, 1 Oct 2025 01:40:22 +0000 (21:40 -0400)]
cmd/go: inject State parameter into `list.runList`

This command modifies the call tree starting at `list.runList` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/list
rf 'inject modload.LoaderState runList'
cd ..
./rf-cleanup.zsh

Change-Id: I7274bc3dc6779bd8306fb79c158aa6f0473827a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/709979
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agocmd/go: inject state parameter into `fmtcmd.runFmt`
Ian Alexander [Fri, 3 Oct 2025 19:04:30 +0000 (15:04 -0400)]
cmd/go: inject state parameter into `fmtcmd.runFmt`

This command modifies the call tree starting at `fmtcmd.runFmt` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/fmtcmd
rf '
  inject modload.LoaderState runFmt
  add fmt.go var moduleLoaderState *modload.State
  ex {
    import "cmd/go/internal/modload";
    modload.LoaderState -> moduleLoaderState
  }
  add runFmt://+0 moduleLoaderState := modload.NewState()
  rm fmt.go:/var moduleLoaderState \*modload.State/
'
cd ..
./rf-cleanup.zsh

Change-Id: Ib6692aba37a2cbc5b52d3bb705ec2b442afd26eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/709989
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: inject state parameter into `clean.runClean`
Ian Alexander [Wed, 8 Oct 2025 16:07:44 +0000 (12:07 -0400)]
cmd/go: inject state parameter into `clean.runClean`

This command modifies the call tree starting at `clean.runClean` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/clean
rf '
  inject modload.LoaderState runClean
  add clean.go var moduleLoaderState *modload.State
  ex {
    import "cmd/go/internal/modload";
    modload.LoaderState -> moduleLoaderState
  }
  add runClean://+0 moduleLoaderState := modload.NewState()
  rm clean.go:/var moduleLoaderState \*modload.State/
'
cd ..
./rf-cleanup.zsh

Change-Id: I2e30e44cfff7e533801dabd7159fa760ac6bb824
Reviewed-on: https://go-review.googlesource.com/c/go/+/710296
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agocmd/go: inject State parameter into `bug.runBug`
Ian Alexander [Thu, 2 Oct 2025 03:01:55 +0000 (23:01 -0400)]
cmd/go: inject State parameter into `bug.runBug`

This command modifies the call tree starting at `bug.runBug` to inject
a `State` parameter to every function that is currently using the
global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/bug
rf 'inject modload.LoaderState runBug'
cd ..
./rf-cleanup.zsh

Change-Id: Idf87733f586a8aae0779132f54a8d988e2551bae
Reviewed-on: https://go-review.googlesource.com/c/go/+/709982
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 months agoruntime: add linkname documentation and guidance
Michael Pratt [Thu, 29 Aug 2024 19:50:47 +0000 (15:50 -0400)]
runtime: add linkname documentation and guidance

Explanation of the different types of linkname and guidance on the
preferred form. Written for myself, as I can never remember the guidance
and always rederive this from first principles.

Change-Id: If10cb8fc87782e25526ad597569e3c526ee33a1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/609715
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Bypass: Michael Pratt <mpratt@google.com>

2 months agoencoding/asn1: use reflect.TypeAssert to improve performance
apocelipes [Mon, 20 Oct 2025 10:15:42 +0000 (10:15 +0000)]
encoding/asn1: use reflect.TypeAssert to improve performance

Use "reflect.TypeAssert" can gain some performance improvements:

goos: darwin
goarch: arm64
pkg: encoding/asn1
cpu: Apple M4
                          │     old     │                new                 │
                          │   sec/op    │   sec/op     vs base               │
ObjectIdentifierString-10   51.48n ± 1%   49.72n ± 2%  -3.41% (p=0.000 n=10)
Marshal-10                  7.549µ ± 0%   7.466µ ± 1%  -1.10% (p=0.000 n=10)
Unmarshal-10                1.808µ ± 0%   1.798µ ± 0%  -0.58% (p=0.000 n=10)
geomean                     889.0n        873.8n       -1.70%

                          │     old      │                  new                  │
                          │     B/op     │     B/op      vs base                 │
ObjectIdentifierString-10     32.00 ± 0%     32.00 ± 0%       ~ (p=1.000 n=10) ¹
Marshal-10                  7.336Ki ± 0%   7.336Ki ± 0%       ~ (p=1.000 n=10) ¹
Unmarshal-10                  432.0 ± 0%     432.0 ± 0%       ~ (p=1.000 n=10) ¹
geomean                       470.0          470.0       +0.00%
¹ all samples are equal

                          │    old     │                 new                 │
                          │ allocs/op  │ allocs/op   vs base                 │
ObjectIdentifierString-10   1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=10) ¹
Marshal-10                  271.0 ± 0%   271.0 ± 0%       ~ (p=1.000 n=10) ¹
Unmarshal-10                24.00 ± 0%   24.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean                     18.67        18.67       +0.00%
¹ all samples are equal

Updates #62121

Change-Id: I139b9d0c729c36018d4e00216ab6fc8388f3b51b
GitHub-Last-Rev: c87aae53727dd151fadf60f6d0089d7f6a805005
GitHub-Pull-Request: golang/go#75825
Reviewed-on: https://go-review.googlesource.com/c/go/+/710555
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agoruntime: fix _rt0_ppc64x_lib on aix
qmuntal [Wed, 8 Oct 2025 14:21:21 +0000 (16:21 +0200)]
runtime: fix _rt0_ppc64x_lib on aix

CL 706395 refactored the ppc64 library entry point and missed some
important aix-specific characteristics:

- _rt0_ppc64x_lib should account for the function descriptor when
getting the callback pointer.

- _rt0_ppc64x_lib should only call _cgo_sys_thread_create when
built as a c-archive.

Fixes #75801

Cq-Include-Trybots: luci.golang.try:gotip-linux-ppc64_power10
Change-Id: I343ca09d3b9688ffa585668a6c52f0ad519d6203
Reviewed-on: https://go-review.googlesource.com/c/go/+/710175
Reviewed-by: Paul Murphy <paumurph@redhat.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2 months agocmd/fix: add modernize and inline analyzers
Alan Donovan [Fri, 10 Oct 2025 19:49:53 +0000 (15:49 -0400)]
cmd/fix: add modernize and inline analyzers

We ran 'go mod vendor' to pull in the newly used packages.

Also, add a cmd/go script test that minimally
exercises each analyzer, analogous to the cmd/vet test.

For #75266
For #75267
For #71859

Change-Id: I334daea048e3d2f614a1788292a3175acf173932
Reviewed-on: https://go-review.googlesource.com/c/go/+/710995
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Alan Donovan <adonovan@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agocmd/go/internal/vet: tweak help doc
Alan Donovan [Fri, 17 Oct 2025 20:11:56 +0000 (16:11 -0400)]
cmd/go/internal/vet: tweak help doc

For #71859

Change-Id: I3cea3375bd5adff9486b849e472d29ad8324dd54
Reviewed-on: https://go-review.googlesource.com/c/go/+/712665
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
2 months agoall: remove unnecessary loop variable copies in tests
Tobias Klauser [Tue, 14 Oct 2025 09:40:26 +0000 (11:40 +0200)]
all: remove unnecessary loop variable copies in tests

Copying the loop variable is no longer necessary since Go 1.22.

Change-Id: Iebb21dac44a20ec200567f1d786f105a4ee4999d
Reviewed-on: https://go-review.googlesource.com/c/go/+/711640
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

2 months agogo/types, types2: remove references to under function in comments
Robert Griesemer [Thu, 16 Oct 2025 23:09:11 +0000 (16:09 -0700)]
go/types, types2: remove references to under function in comments

Follow-up on CL 712400 which removed the under function.

Change-Id: I253c8adbbaa058150f26e311e37b4c1644b6554d
Reviewed-on: https://go-review.googlesource.com/c/go/+/712520
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>

2 months agoall: correct name for comments
Jes Cok [Thu, 16 Oct 2025 01:16:02 +0000 (01:16 +0000)]
all: correct name for comments

Change-Id: I390c380349e99ad421264b673ad7734eddb639d3
GitHub-Last-Rev: 32e849a6420574b0d878b9a449a8c044fd6ebdd1
GitHub-Pull-Request: golang/go#75905
Reviewed-on: https://go-review.googlesource.com/c/go/+/711941
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2 months agoencoding/pem: properly decode strange PEM data
Roland Shoemaker [Wed, 15 Oct 2025 17:45:04 +0000 (10:45 -0700)]
encoding/pem: properly decode strange PEM data

When the passed byte slice has leading garbage, properly handle ignoring
it and continuing to parse the slice until we find a valid block (or
nothing).

Change-Id: I07e937d9c754fd71b028b99450b48f57b4464457
Reviewed-on: https://go-review.googlesource.com/c/go/+/712140
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

3 months agoruntime: unify riscv64 library entry point
qmuntal [Wed, 24 Sep 2025 08:13:44 +0000 (10:13 +0200)]
runtime: unify riscv64 library entry point

Cq-Include-Trybots: luci.golang.try:gotip-linux-riscv64
Change-Id: I6470dfc5c9e03dfe5fc535605fdd7d861b9ba2f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/706415
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

3 months agogo/types, types2: remove under(Type) in favor of Type.Underlying()
Mark Freeman [Thu, 16 Oct 2025 15:08:13 +0000 (11:08 -0400)]
go/types, types2: remove under(Type) in favor of Type.Underlying()

As of CL 695977, under(Type) simply delegates to Type.Underlying().
This is just a cleanup.

Change-Id: I48d5fddc38560dfe485184faa6a5ff713bea74a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/712400
Commit-Queue: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

3 months agogo/types, types2: change and enforce lifecycle of Named.fromRHS and Named.underlying...
Mark Freeman [Wed, 20 Aug 2025 21:30:26 +0000 (17:30 -0400)]
go/types, types2: change and enforce lifecycle of Named.fromRHS and Named.underlying fields

A type definition or alias declaration consists of a type name (LHS)
which is bound to a type expression (RHS) by the declaration.

This CL consistently uses the fromRHS fields of Named and Alias types
to represent that RHS type expression, and sets Named.underlying and
Alias.actual only once those types have been computed.

Currently, Named types use Named.underlying for some of this
functionality, which makes the code difficult to understand. Operations
which used Named.underlying now use Named.fromRHS.

For example, in:

  type A = B
  type B = int

A.fromRHS is B (Alias) and B.fromRHS is int (Basic).

Meanwhile, in:

  type A B
  type B int

A.underlying is B (Named) and B.underlying is int (Basic) initially.

Note that despite A.underlying pointing to B, B is not the underlying
type of A (it is int). At some point during type checking, A walks
through the chain A.underlying -> B.underlying -> int and sets
A.underlying to int.

While this approach works, it introduces some problems:

  1. Whether A.underlying refers to the underlying type (int) or not
     (B) depends on when the field is accessed.
  2. There is no convenient mechanism to check if the underlying type
     of B has been deduced. One can check if B.underlying is a named
     type, but since B.underlying is already B's underlying type (int),
     it's still ambiguous.

Operations derived from Named.underlying share similar problems. For
example, Named.expandUnderlying() (which substitutes type arguments)
returns an instantiated named type whose Named.underlying also may or
may not refer to its underlying type.

With this change, Named.underlying is nil as long as it is unknown, and
non-nil and not a named type once it is known. Additional assertions are
added to enforce that:

  1. Named.underlying is not set until Named has been resolved.
  2. Named is not resolved until Named.fromRHS is populated, unless it
     is given explicit permission. This permission is briefly given
     while type-checking declarations of named types to account for
     cycles of alias types represented as TypeNames. It is also given to
     named types created through NewNamed for backward compatibility.
     This permission is revoked when SetUnderlying is called.

Accessors of Named.underlying are responsible for first resolving
the named type, unless they are in a context where they know the
type to already be resolved.

This change also exposed a bug in validType wherein the underlying
type for struct types containing invalid types did not have their
underlying type set to invalid (see #75194). This bug was exploited by a
test in x/tools, which has been disabled for Go 1.26 (via CL 700395).

Other minor adjustments are made for instantiated and loaded types.
Instantiated types have no RHS as they are not declared, and loaded
types set their RHS to the underlying from export data directly.

Minor simplifications are also made throughout.

Fixes #75194

Change-Id: I72644d7329c996eb1e67514063fe51c3ae06c38d
Reviewed-on: https://go-review.googlesource.com/c/go/+/695977
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
3 months agogo/types, types2: remove superfluous unalias call (minor cleanup)
Robert Griesemer [Thu, 16 Oct 2025 17:33:34 +0000 (10:33 -0700)]
go/types, types2: remove superfluous unalias call (minor cleanup)

Change-Id: Ifc0d6e999777513498f070c5bc2fb4640d38c671
Reviewed-on: https://go-review.googlesource.com/c/go/+/712460
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
3 months agoruntime: use DC ZVA instead of its encoding in WORD in arm64 memclr
Vasily Leonenko [Sat, 23 Aug 2025 09:27:22 +0000 (12:27 +0300)]
runtime: use DC ZVA instead of its encoding in WORD in arm64 memclr

Change-Id: I900a96b985f4d9378d25b9256c4274610fc2f70e
Reviewed-on: https://go-review.googlesource.com/c/go/+/698417
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

3 months agocmd: update to x/tools@7d9453cc
Alan Donovan [Fri, 26 Sep 2025 17:03:12 +0000 (13:03 -0400)]
cmd: update to x/tools@7d9453cc

 go get golang.org/x/tools@master
 go mod tidy
 go mod vendor

in both cmd and src, for (enforced) consistency.

Also: GOWORK=off go generate -run=bundle std

This will enable use of modernize and inline.

Change-Id: I6348dd97ec2c41437b3ca899ed91f10815f2fe26
Reviewed-on: https://go-review.googlesource.com/c/go/+/707135
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
3 months agocmd/internal/obj: move ARM64RegisterExtension from cmd/asm/internal/arch
Vasily Leonenko [Sat, 6 Sep 2025 20:03:16 +0000 (23:03 +0300)]
cmd/internal/obj: move ARM64RegisterExtension from cmd/asm/internal/arch

Change-Id: Iab41674953655efa7be3d306dfb3f5be486be501
Reviewed-on: https://go-review.googlesource.com/c/go/+/701455
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
3 months agoruntime: increase repeat count for alloc test
Keith Randall [Wed, 15 Oct 2025 20:28:15 +0000 (13:28 -0700)]
runtime: increase repeat count for alloc test

To make sure a single spurious alloc doesn't flake the test.

Fixes #75858

Change-Id: I055b37ad5668459bfa7ab1dac97025c997c68f1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/712201
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
3 months agonet/http/httptest: record failed ResponseWriter writes
Damien Neil [Tue, 14 Oct 2025 18:25:29 +0000 (11:25 -0700)]
net/http/httptest: record failed ResponseWriter writes

CL 709335 changed ResponseWriter.Write to return an error
when trying to write to a response with a status code which
doesn't permit a body, such as 304.

Continue to return an error, but still record the write in
ResponseWriter.Body. This maintains the documented property that
"the data in buf is written to rw.Body".

For #75471

Change-Id: I69139797559fe09d6580c5d25b4458f04263c60e
Reviewed-on: https://go-review.googlesource.com/c/go/+/711940
Reviewed-by: Sean Liao <sean@liao.dev>
TryBot-Bypass: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
3 months agocmd: fix three printf problems reported by newest vet
Alan Donovan [Wed, 15 Oct 2025 20:28:03 +0000 (16:28 -0400)]
cmd: fix three printf problems reported by newest vet

Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
Reviewed-on: https://go-review.googlesource.com/c/go/+/712220
Auto-Submit: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Alan Donovan <adonovan@google.com>
Commit-Queue: Alan Donovan <adonovan@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
3 months agocmd/compile: fix an error in comments
mohanson [Wed, 15 Oct 2025 02:27:16 +0000 (10:27 +0800)]
cmd/compile: fix an error in comments

Remove the redundant only.

Change-Id: I9cf2d84ae080a567ad45a2d0ef002c7c89395479
Reviewed-on: https://go-review.googlesource.com/c/go/+/711960
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>

3 months agogo/types, types2: fix misleading internal comment
Robert Griesemer [Wed, 15 Oct 2025 18:27:17 +0000 (11:27 -0700)]
go/types, types2: fix misleading internal comment

See also the discussion in #75885.

Change-Id: Ieb964ea6ee51600c0c08ecba0af50a1deb209a4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/712141
Reviewed-by: Mark Freeman <markfreeman@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
3 months agocmd/compile: replace angle brackets with square
Will Faught [Sat, 20 Sep 2025 21:36:14 +0000 (21:36 +0000)]
cmd/compile: replace angle brackets with square

Caused Markdown rendering error on https://go.dev/src/cmd/compile/README in macOS (15.6.1) Safari (18.6).

Change-Id: Id71436d9a7bc7e461e522500d66df5dda7cd9f7f
GitHub-Last-Rev: 4e4447e163ac65e6c394807ec4874bc5ca26bb32
GitHub-Pull-Request: golang/go#75549
Reviewed-on: https://go-review.googlesource.com/c/go/+/704716
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@google.com>
3 months agocmd/compile: remove rematerializable values from live set across calls
Alexander Musman [Sun, 28 Sep 2025 15:48:46 +0000 (18:48 +0300)]
cmd/compile: remove rematerializable values from live set across calls

Remove rematerializable values in the live set across call operations,
preventing dead constant rematerialization.

When computing live values across function calls, rematerializable
values were being kept in the live set unnecessarily. This caused
the shuffling to rematerialize dead constants.

This change leads to code size reduction on arm64 linux:
    Executable            Old .text  New .text     Change
    -------------------------------------------------------
    asm                     1969236    1964356     -0.25%
    cgo                     1739588    1734884     -0.27%
    compile                 8950788    8932500     -0.20%
    cover                   1877268    1872916     -0.23%
    link                    2572660    2565076     -0.29%
    preprofile               866772     863828     -0.34%
    vet                     2888628    2881028     -0.26%

There seems also some compile time effect:

                        orig.results             uexp.results
                           sec/op       sec/op     vs base
BleveIndexBatch100-4       7.414 ± 2%    7.352 ± 1%       ~ (p=0.218 n=10)
ESBuildThreeJS-4          777.3m ± 1%   778.1m ± 1%       ~ (p=0.529 n=10)
ESBuildRomeTS-4           197.3m ± 1%   199.0m ± 1%       ~ (p=0.143 n=10)
EtcdPut-4                 64.92m ± 2%   64.95m ± 2%       ~ (p=0.912 n=10)
EtcdSTM-4                 323.9m ± 1%   323.0m ± 1%       ~ (p=0.393 n=10)
GoBuildKubelet-4           160.1 ± 0%    159.4 ± 0%  -0.42% (p=0.001 n=10)
GoBuildKubeletLink-4       12.40 ± 1%    12.27 ± 1%       ~ (p=0.529 n=10)
GoBuildIstioctl-4          125.8 ± 0%    125.2 ± 0%  -0.42% (p=0.000 n=10)
GoBuildIstioctlLink-4      8.679 ± 0%    8.686 ± 1%       ~ (p=0.912 n=10)
GoBuildFrontend-4          49.18 ± 0%    48.73 ± 0%  -0.92% (p=0.000 n=10)
GoBuildFrontendLink-4      2.300 ± 1%    2.292 ± 1%  -0.35% (p=0.043 n=10)
GopherLuaKNucleotide-4     37.77 ± 6%    38.07 ± 2%       ~ (p=0.218 n=10)
MarkdownRenderXHTML-4     274.3m ± 0%   275.2m ± 0%  +0.34% (p=0.003 n=10)
Tile38QueryLoad-4         650.7µ ± 0%   650.2µ ± 0%       ~ (p=0.971 n=10)
geomean                    2.130         2.127       -0.15%

Change-Id: I7a766195ee17bfd9e47d7a940864619f553416ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/707415
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

3 months agocmd/compile: eliminate bound check for slices of the same length
Youlin Feng [Tue, 26 Aug 2025 10:23:31 +0000 (18:23 +0800)]
cmd/compile: eliminate bound check for slices of the same length

If two slices start out with the same length and decrease in length by
the same amount on each round of the loop (or in the if block), then
we think their length are always equal.

For example:

if len(a) != len(b) {
return
}
for len(a) >= 4 {
a = a[4:]
b = b[4:] // proved here, omit boundary check
}
if len(a) == len(b) { // proved here
//...
}

Or, change 'for' to 'if':

if len(a) != len(b) {
return
}
if len(a) >= 4 {
a = a[4:]
b = b[4:]
}
if len(a) == len(b) { // proved here
//...
}

Fixes #75144

Change-Id: I4e5902a02b5cf8fdc122715a7dbd2fb5e9a8f5dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/699155
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>