proost opened a new pull request, #45:
URL: https://github.com/apache/datasketches-go/pull/45

   use slices.SortFunc. 
   
   It is generally recommended in [Docs](https://pkg.go.dev/sort#Slice)
   
   Benchmark:
   
   ``` 
   # Sort Performance Comparison For "Row": sort.Slice vs slices.SortFunc
   
   ## Benchmark Results
   
   goos: darwin
   goarch: arm64
   pkg: github.com/apache/datasketches-go/frequencies
   cpu: Apple M1 Pro
   BenchmarkSortSlice
   BenchmarkSortSlice/size=10
   BenchmarkSortSlice/size=10-10                 7209180               160.6 
ns/op           136 B/op          3 allocs/op
   BenchmarkSortSlice/size=100
   BenchmarkSortSlice/size=100-10                 574626              2021 
ns/op             952 B/op          3 allocs/op
   BenchmarkSortSlice/size=1000
   BenchmarkSortSlice/size=1000-10                 27068             43068 
ns/op            8248 B/op          3 allocs/op
   BenchmarkSortSlice/size=10000
   BenchmarkSortSlice/size=10000-10                 1363            864653 
ns/op           81976 B/op          3 allocs/op
   
   
   goos: darwin
   goarch: arm64
   pkg: github.com/apache/datasketches-go/frequencies
   cpu: Apple M1 Pro
   BenchmarkSlicesSortFunc
   BenchmarkSlicesSortFunc/size=10
   BenchmarkSlicesSortFunc/size=10-10            9643902               114.1 
ns/op            80 B/op          1 allocs/op
   BenchmarkSlicesSortFunc/size=100
   BenchmarkSlicesSortFunc/size=100-10            667498              1730 
ns/op             896 B/op          1 allocs/op
   BenchmarkSlicesSortFunc/size=1000
   BenchmarkSlicesSortFunc/size=1000-10            27518             41382 
ns/op            8192 B/op          1 allocs/op
   BenchmarkSlicesSortFunc/size=10000
   BenchmarkSlicesSortFunc/size=10000-10            1582            758889 
ns/op           81920 B/op          1 allocs/op
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to