This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: An article I alluded to


On Wed, 2006-07-26 at 22:54 -0700, Ian Lance Taylor wrote:

> I didn't see any other obvious errors.

  Always try to avoid calling functions within loops or if absolutely
  necessary, use function pointers, especially if the function that is
  called is data dependent.



There may be DSPs where that statement is true, but I doubt it's true
for many general purpose processors.  In fact, on several general
purpose processors calls through a function pointer are more than an
order of magnitude more expensive than a simple direct call.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]