| Crates.io | sortnet |
| lib.rs | sortnet |
| version | 0.1.0 |
| created_at | 2020-02-23 14:27:40.521263+00 |
| updated_at | 2020-02-23 14:27:40.521263+00 |
| description | Sorting Networks for Rust |
| homepage | |
| repository | https://github.com/crepererum/sortnet.rs |
| max_upload_size | |
| id | 211750 |
| size | 31,105 |
Sorting Networks for Rust.
| Input Size | Number of Comparisons |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 1 |
| 3 | 3 |
| 4 | 5 |
| 5 | 9 |
| 6 | 12 |
| 7 | 16 |
| 8 | 19 |
| 9 | 25 |
| 10 | 29 |
| 11 | 35 |
| 12 | 39 |
| 13 | 45 |
| 14 | 51 |
| 15 | 56 |
| 16 | 60 |
sorting_networks (Rust): Uses
Odd-even Mergesort but requires
slightly more comparisons in some cases (e.g. 63 for 16 inputs). Also, sortnet uses compile-time unrolling of the
whole algorithm which hopefully helps compiler and CPUsortnet are taken from.Licensed under either of these:
Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in the work, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.