News for hackers. Stuff that matters.
Re:A 1000-processor chip powered by an AA battery (2016) by nicoburns on Monday February 15, 2021 @07:22AM (#26142047)
Rust's Rayon library is pretty good for these use-cases https://github.com/rayon-rs/rayon

    use rayon::prelude::*;
    fn sum_of_squares(input: &[i32]) -> i32 {
        input.par_iter() // <-- just change that!
             .map(|&i| i * i)
             .sum()
    }

There are no comments on this comment yet.