Re: [AD] sincos

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou wrote:

I originally intended it to be private to Allegro, so that only math3d.c,
quad.c and rotate.c would use it. Do you think we should expose it to the
user ?


It can't hurt, can it? IMHO it's nontrivial to implement (so
it makes sense to have it in a library) and is unlikely to
need maintainance or change its API (so no gain to make it
internal). But I don't mind very much.

Do you mean that calling sincos() takes as much time as calling sin() then
cos() ?

No, I meant that my inline asm al_sincos(), which does not check
the arguments, was as fast as djgpp's non-inline sincos(), which
does check arguments. They both are twice as fast as sin()
followed by cos(). I'd interpret this as the sincos instruction
being slow, so it makes sense to write it, and it's even so slow
that the relative gain of inlining it is small.

Sven



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/