Skip to content

Commit

Permalink
Add utility comment for sort_comp usage in ipnsort
Browse files Browse the repository at this point in the history
  • Loading branch information
Voultapher committed Sep 17, 2023
1 parent 56864fa commit fdf6ac2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ipnsort/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ doctest = false
test = false

[dependencies]
# sort_comp = { git = "https://github.com/Voultapher/sort-research-rs", rev = "37f8b56b7d8af1b3578feabee3c2193c0743bdc4", default-features = false, features = [
# "partition",
# ] }

[dev-dependencies]
sort_test_tools = { path = "../sort_test_tools", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions ipnsort/src/quicksort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ fn partition_lomuto_branchless_cyclic<T, F>(v: &mut [T], pivot: &T, is_less: &mu
where
F: FnMut(&T, &T) -> bool,
{
// A Kind of branchless Lomuto partition paired with a cyclic permutation. As far as I can tell
// this is a novel idea, developed by the author Lukas Bergdoll. Refined code-gen by Orson
// Peters to avoid the cmov.
// A Kind of branchless Lomuto partition paired with a cyclic permutation. To the author's
// knowledge this is a novel idea, developed by Lukas Bergdoll. Refined code-gen by Orson Peters
// to avoid a cmov.

// Manually unrolled to ensure consistent performance across various targets.
const UNROLL_LEN: usize = 2;
Expand Down

0 comments on commit fdf6ac2

Please sign in to comment.