-
Notifications
You must be signed in to change notification settings - Fork 533
Open
Description
I have an iterator where the work to be done for each task varies widely—most items finish very quickly, but a few take orders of magnitude longer.
It appears from my quick experiment that Rayon is being somewhat inefficient here since spawn
performs much better than the ParallelIterator
. It looks like Rayon is still queuing up fast tasks behind the slow task on the same thread pool, or otherwise running fast tasks after the slow task.
The optimal strategy here, which spawn seems to support, is to continue chewing through tasks on other threads while 1 thread stays stuck on the slow task.
Is there a way to do this with par_iter
which has much nicer iteration semantics, or do I need to manage spawning myself?
Metadata
Metadata
Assignees
Labels
No labels