
Concurrency
Data Parallelism in Rust With Rayon and Parallel Iterators
Swap iter for par_iter and Rayon splits the work across a thread pool. See the speedup conditions, the traits it needs and when it makes things slower.
8 min read
Tag
2 posts

Swap iter for par_iter and Rayon splits the work across a thread pool. See the speedup conditions, the traits it needs and when it makes things slower.

Both move blocking work off the async threads, but they differ in pool, limits and fit. See which to pick for file I/O, hashing and number crunching.