commit | ec3f01382ef9858d8198a179d85a6913d97fa86f | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Fri Sep 30 10:44:54 2022 -0400 |
committer | Jonathan Amsterdam <jba@google.com> | Fri Sep 30 20:26:32 2022 +0000 |
tree | d6ed90135564444546740a5ba24ff10642984f1c | |
parent | de9c53c655b96e3336ec49e50464e9c7b16b7d41 [diff] |
slog: faster Record.Clone Record.Clone no longer copies the Record's []Attr. Previously, Record.Clone made a copy of the Record's Attr slice. Since a Record's list of Attrs can only be appended to, we don't need to copy the slice, only clip it (setting capacity to length). We are effectively doing copy-on-write. After this change, is Clone still the right name? Change-Id: I10d86b2b5b17e503224fc9f9bb5c07e70e8fca36 Reviewed-on: https://go-review.googlesource.com/c/exp/+/436756 Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This subrepository holds experimental and deprecated (in the old
directory) packages.
The idea for this subrepository originated as the pkg/exp
directory of the main repository, but its presence there made it unavailable to users of the binary downloads of the Go installation. The subrepository has therefore been created to make it possible to go get
these packages.
Warning: Packages here are experimental and unreliable. Some may one day be promoted to the main repository or other subrepository, or they may be modified arbitrarily or even disappear altogether.
In short, code in this subrepository is not subject to the Go 1 compatibility promise. (No subrepo is, but the promise is even more likely to be violated by go.exp than the others.)
Caveat emptor.