jalberse / feriphys

Physics simulations for computer graphics, in Rust
GNU General Public License v3.0
2 stars 0 forks source link

Add free list to ParticlePool #25

Open jalberse opened 1 year ago

jalberse commented 1 year ago

Right now we iterate the pool to find the first not-in-use particle. This is really inefficient, we should implement a free list. This will probably allow the CPU bound particle simulation to have many more particles active.

jalberse commented 1 year ago

Instead of rolling my own particle pool, we might want to use a crate: https://docs.rs/pool/latest/pool/struct.Pool.html

jalberse commented 1 year ago

Or maybe: https://github.com/CJP10/object-pool