![]() # Objective - bevy usually use `Parallel::scope` to collect items from `par_iter`, but `scope` will be called with every satifified items. it will cause a lot of unnecessary lookup. ## Solution - similar to Rayon ,we introduce `for_each_init` for `par_iter` which only be invoked when spawn a task for a group of items. --- ## Changelog - added `for_each_init` ## Performance `check_visibility ` in `many_foxes `  ~40% performance gain in `check_visibility`. --------- Co-authored-by: James Liu <contact@jamessliu.com> |
||
---|---|---|
.. | ||
cow_arc.rs | ||
default.rs | ||
futures.rs | ||
lib.rs | ||
once.rs | ||
parallel_queue.rs | ||
short_names.rs | ||
synccell.rs | ||
syncunsafecell.rs |