When running the UI on the larger simulations, the vast majority of the CPU time is spent in MechanicsCore.Simulation.Leap(). At 2109d1944967f81eb04d241873f6de4249316100 I tried speeding it up by using Parallel.For, which did make huge simulations a bit faster, but small simulations are much slower, and the whole UI is much jerkier; i.e. the speed is inconsistent.
I have a hunch that it would perform better if we used Rust for the backend calculations.
[x] #3
[x] #2
[x] #4
[x] #8
[ ] Write Rust code to take an array of bodies and compute their next positions for a given step length and number of steps.
[ ] Rewrite SunEarthMoon to use the new Rust code; it only needs the simple gravitational acceleration.
[ ] Add softened and buoyant gravity options to Rust and use it for the applicable simulations.
[ ] Add drag force to Rust and use it for all simulations.
When running the UI on the larger simulations, the vast majority of the CPU time is spent in
MechanicsCore.Simulation.Leap()
. At 2109d1944967f81eb04d241873f6de4249316100 I tried speeding it up by usingParallel.For
, which did make huge simulations a bit faster, but small simulations are much slower, and the whole UI is much jerkier; i.e. the speed is inconsistent.I have a hunch that it would perform better if we used Rust for the backend calculations.
SunEarthMoon
to use the new Rust code; it only needs the simple gravitational acceleration.