Closed tristanpoland closed 1 week ago
looking into it further, this code seems to be part of terraforge::space::simulate
there are two ways i can think of mitigating this:
use what instructions the CPU is capable of, so it spends less time in the iterator (in the update_position
function)
parallelize the iterator with rayon
of course, these can be combined.
looking into it further, this code seems to be part of terraforge::space::simulate
there are two ways i can think of mitigating this: use what instructions the CPU is capable of, so it spends less time in the iterator (in the
update_position
function) parallelize the iterator with rayonof course, these can be combined.
sizable performance improvement on my end from commit 273b986 on my machine. for reference, it used to take 1.6 seconds
note: I had to go into the code and add the space module back and call the function, as it was removed
@WilliamAnimate This ended up being merged correct?
@WilliamAnimate This ended up being merged correct?
yes, however, this commit removes the space::simulate call which means my new code isn't being called.
@WilliamAnimate This ended up being merged correct?
yes, however, this commit removes the space::simulate call which means my new code isn't being called.
Thanks bud, ill take a look into getting that re-added later on in Terraforge's development, Odds are the orbit functionality will be migrated
a lot of time is being spent iterating through a Vec