Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion performance/rust_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2024"
rayon = "^1.11"

i_key_sort = { path = "../../iKeySort", features = ["allow_multithreading"] }
rand = "0.9.2"
rand = "0.10.1"
#i_key_sort = { path = "../../iKeySort", default-features = false }
2 changes: 1 addition & 1 deletion performance/rust_app/src/exp/random.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use rand::RngExt;
use crate::geom::id_segment::IdSegment;
use crate::geom::index_segm::IndexSegment;
use crate::geom::point::Point;
use crate::geom::segm::Segment;
use crate::solver::sort::SortSolution;
use rand::Rng;

pub struct RandomTest {
segments: Vec<Segment>,
Expand Down
6 changes: 3 additions & 3 deletions performance/rust_app/src/solver/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl SortSolution {

let n = Self::repeat_count(segments.len());
for _ in 0..n {
data.copy_from_slice(&segments);
data.copy_from_slice(segments);
data.sort_unstable_by(|s0, s1| s0.cmp_by_start(s1));
}
let duration = start.elapsed().as_secs_f64() / (n as f64);
Expand All @@ -28,7 +28,7 @@ impl SortSolution {

let n = Self::repeat_count(segments.len());
for _ in 0..n {
data.copy_from_slice(&segments);
data.copy_from_slice(segments);
data.sort_by(|s0, s1| s0.cmp_by_start(s1));
}
let duration = start.elapsed().as_secs_f64() / (n as f64);
Expand All @@ -44,7 +44,7 @@ impl SortSolution {

let n = Self::repeat_count(segments.len());
for _ in 0..n {
data.copy_from_slice(&segments);
data.copy_from_slice(segments);
data.par_sort_unstable_by(|s0, s1| s0.cmp_by_start(s1));
}
let duration = start.elapsed().as_secs_f64() / (n as f64);
Expand Down
Loading