Re: [ODE] I´m totally unhappy with ODE ... Please Help me

Andreas Fredriksson deplinenoise at gmail.com
Mon Dec 18 06:29:29 MST 2006


On 12/18/06, Pavel Antokolsky aka Zigmar <zigmar at gmail.com> wrote:

> Considering the following code that calls 29 times (!) to
> trigonometric functions to construct one single matrix, I'm  surprised
> it moves at all. You really should re-consider your implementation if
> you want to make your game run at reasonable speed.

A decent optimizer should replace these variations with a few
calculations through common subexpression elimination. That said, I
would use the more optimizer-friendly floating point versions of the
cos and sin functions (sinf and cosf) and move the calculations
outside to get a speedup in debug builds as well.

// Andreas


More information about the ODE mailing list