@improbable22 compute_force
really depends on the body itself and how deep down the tree you have to traverse to compute all the interactions. So the execution time varies wildly.
And yes, I was mutating the MVectors in place. Replacing MVectors with SVectors brought down the execution time from 60 seconds to 35 seconds.
All of the ::Float64
are unnecessary I agree, I added them just so I could be sure there is no type instability. And I’ll delete other unnecessary things like inbounds
, because I was just trying all kinds of optimizations.