bevy/crates/bevy_pbr
Robert Swain 786654307d bevy_pbr: Optimize assign_lights_to_clusters (#3984)
# Objective

- Optimize assign_lights_to_clusters

## Solution

- Avoid inserting entities into hash sets in inner loops when it is known they will be inserted in at least one iteration of the loop.
- Use a Vec instead of a hash set where the set is not needed
- Avoid explicit calculation of the cluster_index from x,y,z coordinates, instead using row and column offsets and just adding z in the inner loop 
- These changes cut the time spent in the system roughly in half
2022-02-28 22:02:06 +00:00
..
src bevy_pbr: Optimize assign_lights_to_clusters (#3984) 2022-02-28 22:02:06 +00:00
Cargo.toml Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00