From 1dec7b28b89f858cb7989938805d2dcefab4bc95 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Tue, 4 Mar 2025 15:14:21 +0300 Subject: refactor: Replace redundant double-sorting with a single call to `custom_float_sorter`. --- src/correlations.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/correlations.rs b/src/correlations.rs index 0437f8d..29b9064 100644 --- a/src/correlations.rs +++ b/src/correlations.rs @@ -176,12 +176,6 @@ impl<'a> Compute<'a> { Err(err) => panic!("an error ocurrexxxxxxxxxxxxxxd {:?}", err), } - //naive implementation try extern sorting could save 3 seconds - - corr_results.sort_by(|a, b| { - b.1.abs().partial_cmp(&a.1.abs()).unwrap_or_else(|| { - Ordering::Less})}); - sort_write_to_file(String::from(self.output_file), corr_results) } } -- cgit 1.4.1