3 ms·
The rayon library uses work stealing for this. Its parallel iterators offer some control of splitting strategies and granularity, so you can tune the trade-off
by pornel 2y ago
The rayon library uses work stealing for this. Its parallel iterators offer some control of splitting strategies and granularity, so you can tune the trade-off between full utilization and cost of moving things between threads.
Additionally, in Bevy, independent queries (systems) are executed in parallel, so there's always something else to do, except your one worst loop.