GCC 3.3 release criteria
Robert Dewar
dewar@gnat.com
Wed Feb 26 02:42:00 GMT 2003
> Yes and no. One section, "an inline function is as fast as a macro",
> implies that a function that's declared inline will always be
> inlined (at least if you're using -O and if the function doesn't use
> constructs that are unsuitable for inlining).
This seems a reasonable expectation for sure (that if you ask for a functoin
to be inlined, and the function doesn't use constructs that are unsuitable
for inlining, and you are using -O, then calls should be inlined, assuming
this will in fact generate faster code, as is the case on most processors.
Note also that inlining helps avoid cache flushing anomolies.
More information about the Gcc
mailing list