Date: Tue, 2 Sep 1997 19:59:21 -0700 (PDT) Message-Id: <199709030259.TAA10342@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: djgpp AT delorie DOT com From: Nate Eldredge Subject: Optimization of math.h functions Precedence: bulk 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