quant icon indicating copy to clipboard operation
quant copied to clipboard

feat: implement new faster sort algorithm for Go 1.18

Open aymanbagabas opened this issue 10 months ago • 0 comments

This implements the pdqsort algorithm for Go 1.18 and later. The new algorithm is ~10x faster than sort.Sort and was added to the slices package in Go 1.20.

The algorithm is backported from the stdlib and is used in this package to provide a faster median cut algorithm.

P.S. You can use my fork go get github.com/aymanbagabas/quant@master to use this patch

aymanbagabas avatar Feb 20 '25 21:02 aymanbagabas