Spreading it over frames is a type of optimization of its own. This is completely orthogonal to "consistent execution time". Though if this is what was meant by consistent execution time, then I apologize for my confusion. (I recommend the same concept using the term "load balancing" above.) I was treating as meaning only changing the code so it performs the same function, but with consistent execution time.Rahsennor wrote:By spreading it over more frames.
Saving time if there's less work to do gives more CPU time for other objects, though. If you're talking about a collection of the same object all synchronized to hit a spike at the same time, yes it's worse, but again the suggestion is "load balancing". If you can coordinate so they're not all spiking at the same time, the saved CPU in the "less work" instances can make more room for the worst case instance.93143 wrote:Maybe there's a lot of testing and branching that only saves time if there's less work to do.