3 ms·
Does anyone understand the difference (in the benchmark tables) between faer and faer(par)? Which number should be considered important?
by andyferris 2y ago
Does anyone understand the difference (in the benchmark tables) between faer and faer(par)? Which number should be considered important?
- royjacobs 2y agoIf you look at the benchmark code [0] you can see it indicates whether Rayon is used for parallelism. [0] https://github.com/sarah-ek/faer-rs/blob/main/faer-bench/src/main.rs https://github.com/sarah-ek/faer-rs/blob/main/faer-bench/src...
- llimllib 2y agothe 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.
- deleted 2y ago[deleted]