zvxryb / broadphase-rs

A broadphase collision detection library, in Rust
MIT License
12 stars 1 forks source link

Look into optimizing merge for sorted lists #5

Open zvxryb opened 5 years ago

zvxryb commented 5 years ago

Layer::merge exists as an optimization for systems with lots of static geometry, enabling index data to be used for multiple frames without recalculation. It currently only appends data and clears the "sorted" flag, forcing a later re-sort. In the case of static geometry layers, the layer could be sorted once ahead of time and be merged with the sorted elements of another list without requiring a full resort of every item.