Registry / utility / dmsort

dmsort

JSON →
library1.0.2rscratesunverified

Fast adaptive sorting for when most of your data is already in order; can be 2-5 times faster than Rust's default sort when over 80% of elements are sorted.

# Cargo.toml [dependencies] dmsort = "1.0.2"
INSTALL
IMPORT
SIG · DMSORT
D
dmsort
utilityrustv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sort
use dmsort::sort;

Sort a vector using dmsort's adaptive algorithm.

use dmsort::sort; fn main() { let mut data = vec![3, 1, 2, 4, 5]; sort(&mut data); println!("Sorted: {:?}", data); }
Debug
Known issues
gotchaPerformance degrades significantly when data is not mostly sorted; may be slower than standard sort for random data.
fix
Use standard `sort` or `sort_unstable` for random data; reserve dmsort for nearly-sorted inputs.
affects: >=1.0.0
Upgrade
Version history
1.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Meta
2
Resources
dmsort — cargo add dmsort · libregistry