rayon-rs / rayon

Rayon: A data parallelism library for Rust
Apache License 2.0
10.94k stars 496 forks source link

rayon and itertools #993

Open bobi6666 opened 1 year ago

bobi6666 commented 1 year ago

hello on this link which will be at the end of this post i have some methods that i would like to speedup with itertools and rayon and i would like to ask if there is something i can do? https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6ddc6873616f259bc999fae1ed1aaba2

wagnerf42 commented 1 year ago

hi, not sure exactly what you are looking for but if it's a 'tuple' adaptor I have one here : https://github.com/wagnerf42/diam if your question is something else, you should maybe be more explicit.

bobi6666 commented 1 year ago

I will look at your adapter but in my example I would like to replace into_iter() with into_par_iter().tuples() and that doesn't work because there is no implementation

2022-11-21 13:28 GMT+01:00, wagnerf42 @.***>:

hi, not sure exactly what you are looking for but if it's a 'tuple' adaptor I have one here : https://github.com/wagnerf42/diam if your question is something else, you should maybe be more explicit.

-- Reply to this email directly or view it on GitHub: https://github.com/rayon-rs/rayon/issues/993#issuecomment-1321986064 You are receiving this because you authored the thread.

Message ID: @.***>

cuviper commented 1 year ago

I think arrays are going to be a better way to handle this, like #974, since we can make that truly generic in length, vs. needing variadic types for tuples even though the elements are all the same type. (Or lacking variadics, then having manual implementations for different lengths.)

wagnerf42's crate looks fine to give you .into_par_iter().tuples() though, at least for 2 or 3 item tuples.