File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ edition = "2024"
77rayon = " ^1.11"
88
99i_key_sort = { path = " ../../iKeySort" , features = [" allow_multithreading" ] }
10- rand = " 0.9.2 "
10+ rand = " 0.10.1 "
1111# i_key_sort = { path = "../../iKeySort", default-features = false }
Original file line number Diff line number Diff line change 1+ use rand:: RngExt ;
12use crate :: geom:: id_segment:: IdSegment ;
23use crate :: geom:: index_segm:: IndexSegment ;
34use crate :: geom:: point:: Point ;
45use crate :: geom:: segm:: Segment ;
56use crate :: solver:: sort:: SortSolution ;
6- use rand:: Rng ;
77
88pub struct RandomTest {
99 segments : Vec < Segment > ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ impl SortSolution {
1212
1313 let n = Self :: repeat_count ( segments. len ( ) ) ;
1414 for _ in 0 ..n {
15- data. copy_from_slice ( & segments) ;
15+ data. copy_from_slice ( segments) ;
1616 data. sort_unstable_by ( |s0, s1| s0. cmp_by_start ( s1) ) ;
1717 }
1818 let duration = start. elapsed ( ) . as_secs_f64 ( ) / ( n as f64 ) ;
@@ -28,7 +28,7 @@ impl SortSolution {
2828
2929 let n = Self :: repeat_count ( segments. len ( ) ) ;
3030 for _ in 0 ..n {
31- data. copy_from_slice ( & segments) ;
31+ data. copy_from_slice ( segments) ;
3232 data. sort_by ( |s0, s1| s0. cmp_by_start ( s1) ) ;
3333 }
3434 let duration = start. elapsed ( ) . as_secs_f64 ( ) / ( n as f64 ) ;
@@ -44,7 +44,7 @@ impl SortSolution {
4444
4545 let n = Self :: repeat_count ( segments. len ( ) ) ;
4646 for _ in 0 ..n {
47- data. copy_from_slice ( & segments) ;
47+ data. copy_from_slice ( segments) ;
4848 data. par_sort_unstable_by ( |s0, s1| s0. cmp_by_start ( s1) ) ;
4949 }
5050 let duration = start. elapsed ( ) . as_secs_f64 ( ) / ( n as f64 ) ;
You can’t perform that action at this time.
0 commit comments