Mail Archives: djgpp/1997/09/02/23:00:51
Does anybody know why the math functions aren't implemented as inline
functions in the header file, but rather as regular functions? Since most of
them are just one or two instructions, it seems that making them available
as inline asm functions (like Allegro's _putpixel) would be much more
efficient. For starters, it would avoid storing local floating-point
variables from registers onto the stack, then reloading them within the
function.
At the very least, those to which it applies should have GCC's "const"
attribute applied to them to let the compiler optimize better.
If there's a disadvantage to this, somebody please let me know. Otherwise, I
think it should be done.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -