jalberse / feriphys

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

State too slow #62

Open jalberse opened 1 year ago

jalberse commented 1 year ago

Discovered during SPH development that the State representation is too slow; too many copies, possibly? We create/destroy the State each frame which could be a lot of large allocations.

We should prefer to have one allocation for the state that's reused.

jalberse commented 1 year ago

I have improved this in a local commit by fioxin gfrom_state_vector. Possibly still an issue, we'll see once that's in. Dev in issue 61.

jalberse commented 1 year ago

Profiling shows that from_state_vector is still taking up the largest chunk of time in an Euler step by far (others negligible), but is much improved. Maybe can be improved further.