mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 14:10:19 +00:00
786654307d
# 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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |