Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tritonho/qsortm
https://github.com/tritonho/qsortm
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tritonho/qsortm
- Owner: TritonHo
- License: gpl-2.0
- Created: 2020-12-25T17:00:43.000Z (about 4 years ago)
- Default Branch: develop
- Last Pushed: 2021-02-02T15:21:52.000Z (almost 4 years ago)
- Last Synced: 2024-10-15T12:17:04.740Z (3 months ago)
- Language: Go
- Size: 38.1 KB
- Stars: 65
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
qsortm = qsort with full Multithreading
A 100% compatible drop-in replacement of Sort() and Slice() in "sort"
# Benchmark
Raw Result (on AMD Ryzen 3600, 6c12t, 1M records)
| | ns/op |
| ------------- | ------------ |
| qsortm Sort | 43.92 ns/op |
| qsortm Slice | 32.65 ns/op |
| std Sort | 193.57 ns/op |
| std Slice | 168.86 ns/op |# Usage
100% compatibility with standard lib
Replace
```go
import "sort"sort.Sort(slice)
sort.Slice(slice, lessFn)
```with
```go
import "github.com/TritonHo/qsortm"qsortm.Sort(slice)
qsortm.Slice(slice, lessFn)
```# TODO
- Performance improvement on Sort()
- Add Support for Ints(), Float64s()
- Add CI and more testcase
- Add heapsort implementation to handle edge cases