Questions tagged [rayon]

A Rust data-parallelism library that makes it easy to convert sequential computations into parallel Rayon is lightweight and convenient for introducing parallelism into existing code. It guarantees data-race free executions and takes advantage of parallelism when sensible, based on work-load at runtime.

See the official documentation for more information.

123 questions
0
votes
1 answer

How do I detect overflow on a sum of integers using Rayon?

Is there a way to detect an overflow in Rayon and force it to panic instead of having an infinite loop? extern crate rayon; use rayon::prelude::*; fn main() { let sample: Vec = (0..50000000).collect(); let sum: u32 =…
Tyfingr
  • 154
  • 1
  • 9
-1
votes
3 answers

How is Rust --release build slower than Go?

I'm trying to learn about Rust's concurrency and parallel computing and threw together a small script that iterates over a vector of vectors like it was an image's pixels. Since at first I was trying to see how much faster it gets iter vs par_iter I…
l1901
  • 21
  • 3
-2
votes
1 answer

How to iterate through a HashMap in parallel in Rust?

I have a HashMap and want to iterate through its values in parallel using rayon. I cannot consume it and it is not feasible to first create a Vec from the values. Does anyone have an idea on how to do this?
Lukas
  • 381
  • 3
  • 13
1 2 3
8
9