[ODE] I´m totally unhappy with ODE ... Please Help me
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Mon Dec 18 11:12:52 MST 2006
Don't assume that function calls can be replaced using CSE. Only if you
enable intrinsics will that be possible, because the compiler can't
assume that you won't link with some library where sin() and cos() use
static data, and return different results for different calls.
Cheers,
/ h+
Andreas Fredriksson wrote:
> 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
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>
More information about the ODE
mailing list