slices: use pdqsort

Sync with CL 371574.

- pdqsort paper: https://arxiv.org/pdf/2106.05123.pdf
- C++ implementation: https://github.com/orlp/pdqsort
- Rust implementation: https://docs.rs/pdqsort/latest/pdqsort/

For golang/go#50154

name                       old time/op  new time/op  delta
SortInts-16                10.8ms ± 3%  10.8ms ± 3%     ~     (p=0.461 n=20+20)
SlicesSortInts-16          6.14ms ± 3%  6.29ms ± 3%   +2.43%  (p=0.000 n=20+19)
SlicesSortInts_Sorted-16   1.78ms ± 4%  0.09ms ± 2%  -95.01%  (p=0.000 n=18+20)
SlicesSortInts_Reversed-16 1.82ms ± 5%  0.13ms ± 2%  -92.67%  (p=0.000 n=20+20)
SortStrings-16             23.0ms ± 2%  23.1ms ± 1%     ~     (p=0.253 n=20+20)
SlicesSortStrings-16       19.1ms ± 2%  19.0ms ± 2%     ~     (p=0.270 n=20+19)
SortStructs-16             15.7ms ± 4%  15.7ms ± 3%     ~     (p=0.989 n=20+20)
SortFuncStructs-16         13.6ms ± 1%  12.7ms ± 3%   -6.39%  (p=0.000 n=19+20)

Change-Id: Ia563fe1c70d6d2ac098a97e1f870040d038cf61c
Reviewed-on: https://go-review.googlesource.com/c/exp/+/399315
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eli Bendersky <eliben@google.com>
5 files changed
tree: c4983ac649678ea84f8e4358ed9fa7de64bac80e
  1. apidiff/
  2. cmd/
  3. constraints/
  4. devtools/
  5. ebnf/
  6. ebnflint/
  7. errors/
  8. event/
  9. fsnotify/
  10. inotify/
  11. io/
  12. jsonrpc2/
  13. maps/
  14. mmap/
  15. rand/
  16. shiny/
  17. shootout/
  18. slices/
  19. sumdb/
  20. typeparams/
  21. utf8string/
  22. winfsnotify/
  23. .gitattributes
  24. .gitignore
  25. AUTHORS
  26. codereview.cfg
  27. CONTRIBUTING.md
  28. CONTRIBUTORS
  29. go.mod
  30. go.sum
  31. LICENSE
  32. PATENTS
  33. README.md
README.md

exp

PkgGoDev

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.