Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does anyone understand the difference (in the benchmark tables) between faer and faer(par)? Which number should be considered important?


If 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...


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/172f651fafe625a2534...


Rayon 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.


Rayon is a library that helps to parallelize sequential computations while guaranteeing data-race freedom. Cf. https://docs.rs/rayon/latest/rayon/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: