c3da3bcd8e
Forwards the following functions to the slices package: sort.Ints sort.Strings sort.Float64s sort.IntsAreSorted sort.StringsAreSorted sort.Float64sAreSorted benchstat results on the sort package's benchmarks: goos: linux goarch: amd64 pkg: sort cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz SearchWrappers-8 58.10n ± 0% 58.43n ± 1% +0.57% (p=0.004 n=10) SortString1K-8 76.53µ ± 1% 66.04µ ± 2% -13.71% (p=0.000 n=10) SortString1K_Slice-8 71.99µ ± 1% 72.32µ ± 2% ~ (p=0.481 n=10) StableString1K-8 92.66µ ± 1% 92.10µ ± 2% -0.61% (p=0.019 n=10) SortInt1K-8 34.31µ ± 0% 11.49µ ± 2% -66.50% (p=0.000 n=10) SortInt1K_Sorted-8 2699.5n ± 1% 959.0n ± 3% -64.47% (p=0.000 n=10) SortInt1K_Reversed-8 3.990µ ± 1% 1.429µ ± 4% -64.19% (p=0.000 n=10) SortInt1K_Mod8-8 13.695µ ± 1% 5.129µ ± 2% -62.55% (p=0.000 n=10) StableInt1K-8 46.22µ ± 1% 46.80µ ± 1% ~ (p=0.109 n=10) StableInt1K_Slice-8 44.12µ ± 1% 44.32µ ± 2% ~ (p=0.315 n=10) SortInt64K-8 3.848m ± 0% 1.857m ± 2% -51.76% (p=0.000 n=10) SortInt64K_Slice-8 3.690m ± 0% 3.740m ± 0% +1.36% (p=0.002 n=10) StableInt64K-8 3.901m ± 0% 3.917m ± 0% +0.42% (p=0.003 n=10) Sort1e2-8 32.22µ ± 2% 32.40µ ± 2% ~ (p=0.529 n=10) Stable1e2-8 54.11µ ± 1% 54.11µ ± 1% ~ (p=0.796 n=10) Sort1e4-8 5.998m ± 1% 5.993m ± 1% ~ (p=0.579 n=10) Stable1e4-8 15.23m ± 0% 15.32m ± 0% +0.59% (p=0.000 n=10) Sort1e6-8 902.8m ± 0% 904.3m ± 0% ~ (p=0.075 n=10) Stable1e6-8 3.089 ± 0% 3.089 ± 0% ~ (p=0.971 n=10) geomean 259.8µ 200.0µ -22.99% Most of the benchmarks are unaffected. The ones with significant reductions are precisely for the functions that were forwarded. This CL has to move some things around to avoid a circular dependency between sort and slices. Since sort depends on slices now, nothing in slices can depend on sort - not even in tests. Fixes #61180 Change-Id: Ic0e5f519863d96a139fada08aefb1bcdf4c7a9a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/508135 Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Eli Bendersky <eliben@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
go.env | ||
LICENSE | ||
PATENTS | ||
README.md | ||
SECURITY.md |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.