Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. sorty

sorty

MPL-2.0Gov2.1.3

A fast, concurrent/parallel sorting library for Go with type-specific and generic slice sorting.

GitHubGitHub
145 stars6 forks0 contributors

What is sorty?

sorty is a concurrent and parallel sorting library for Go, designed to sort slices quickly using multiple CPU cores. It implements an innovative in-place QuickSort algorithm that requires no extra memory, providing both type-specific sorting for native Go types and generic sorting via a custom `lesswap()` function.

Target Audience

Go developers working with large datasets or performance-sensitive applications who need faster sorting than the standard library offers, especially those leveraging multi-core systems.

Value Proposition

sorty offers significantly faster sorting for generic collections compared to Go's standard `sort.Interface`, with built-in concurrency, efficient resource usage, and tunable parameters for optimal performance across different hardware.

Overview

:zap: Fast Concurrent / Parallel Sorting in Go

Use Cases

Best For

  • Sorting large slices of integers, floats, or strings with high performance
  • Parallelizing sorting tasks to leverage multiple CPU cores in Go applications
  • Sorting custom data structures faster than Go's standard library sort
  • Sorting slices by length (e.g., strings or nested slices)
  • Applications requiring in-place sorting without extra memory allocation
  • Tuning sorting performance for specific CPU architectures

Not Ideal For

  • Applications requiring stable sorting to preserve the order of equal elements
  • Projects sorting very small slices where Go's standard library sort is sufficient
  • Teams wanting drop-in sorting for custom types without writing a lesswap() function
  • Environments with single-core CPUs where concurrency provides no benefit

Pros & Cons

Pros

High-Performance Concurrency

Utilizes up to MaxGor goroutines for parallel sorting, speeding up large datasets on multi-core systems, as evidenced by benchmarks in the README.

Type-Specific Optimization

Natively sorts slices of integers, floats, strings, and more efficiently, avoiding the overhead of generic interfaces for common Go types.

Resource-Efficient Design

Only creates goroutines and channels for larger inputs, with live tuning of MaxGor to minimize overhead, making it adaptable to varying workloads.

Faster Generic Sorting

The lesswap() function is documented to operate faster than Go's standard sort.Interface, improving performance for custom collections as highlighted in the README.

Cons

No Stable Sorting

Based on QuickSort, sorty does not offer stable sorting, which limits its use in applications where preserving the order of equal elements is essential.

Manual Performance Tuning

Achieving optimal performance requires running platform-specific tests with tags and manually updating MaxLen* parameters, adding complexity to setup.

Lacks Partial Sort Detection

The README admits that sorty does not recognize partially sorted slices to sort them faster, missing optimizations available in other libraries like pdqsort.

Frequently Asked Questions

Quick Stats

Stars145
Forks6
Contributors0
Open Issues0
Last commit3 months ago
CreatedSince 2019

Tags

#parallel-computing#parameter-tuning#parallelism#sorting#go-library#golang#concurrency#sorting-algorithm#quicksort#performance

Built With

G
Go

Included in

Go169.1k
Auto-fetched 8 hours ago

Related Projects

fzffzf

:cherry_blossom: A command-line fuzzy finder

Stars82,864
Forks2,863
Last commit1 day ago
divedive

A tool for exploring each layer in a docker image

Stars54,539
Forks1,998
Last commit8 months ago
HubHub

A command-line tool that makes git easier to use with GitHub.

Stars22,957
Forks2,221
Last commit2 years ago
lolo

💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

Stars21,429
Forks953
Last commit20 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub