From 86c0743c8beb2dad547f05b98060efbc2bb0598a Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 1 Feb 2024 17:13:39 +0100 Subject: [PATCH] will have to be good enough --- members/tokryon/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/members/tokryon/src/main.rs b/members/tokryon/src/main.rs index 134885d..6696641 100644 --- a/members/tokryon/src/main.rs +++ b/members/tokryon/src/main.rs @@ -4,7 +4,7 @@ use tokio::time::Instant; // if we make these larger, our computer can be used as a heateršŸ”„ type Danum = u16; -const EXP: usize = 15; +const EXP: usize = 12; // FIXME: If this goes lower than 7, somehow the mpsc breaks? const CAP: usize = 1 << EXP; const M: u128 = CAP as u128 * Danum::MAX as u128; @@ -53,7 +53,8 @@ async fn main() { } let start = Instant::now(); - let separate: usize = ((M / (1 << 11 + EXP)) + 1) as usize; + let separate: usize = 1 << (EXP / 2); + // stops earlier sometimes let (sender, recv) = std::sync::mpsc::channel(); rayon::spawn(move || { for i in 0..separate + 1 {