4 ms·
the former is run with no parallelism, and the latter with `parallelism::Rayon(0)`, which presumably means that it has some parallelism, though I don't write ru
by llimllib 2y ago
the former is run with no parallelism, and the latter with `parallelism::Rayon(0)`, which presumably means that it has some parallelism, though I don't write rust or know what Rayon is.
[1]: https://github.com/sarah-ek/faer-rs/blob/172f651fafe625a2534eed625ba9152677232a67/faer-bench/src/main.rs#L287-L297 https://github.com/sarah-ek/faer-rs/blob/172f651fafe625a2534...
- nateb2022 2y agoRayon is a library that helps to parallelize sequential computations while guaranteeing data-race freedom. Cf. https://docs.rs/rayon/latest/rayon/ https://docs.rs/rayon/latest/rayon/
- nindalf 2y agoRayon is a crate that makes it easy to write code that executes in parallel. Take a function that looks like this. It'll execute on a single thread. fn sum_of_squares(input: &[i32]) -> i32 { input.iter() .map(|&i| i * i) .sum() } If you changed it to input.par_iter() then it executes in parallel on multiple threads.