Mail Archives: djgpp/1996/07/23/19:21:26
Reply to message 6380262 from JAN AT STACK DOT URC on 07/23/96 6:22AM
>And if I remember correctly dont use -O2 or -O3 or the compiler will make
>all funcitons calls inline!
Not all; just the ones that it thinks could provide a profitable speed
increase if inlined. Also, the function can't be recursive or call certain
other kinds of functions. And you only get this behavior when you
compile with -O3, or explictly specify '-finline-functions'.
A few notes about -O3: It will slow down compilation by as much as 50%,
makes your executables quite a bit larger, and doesn't always improve
speed. Unless you really, REALLY need speed and don't care about
anything else, the best optimization in terms of size and speed is -O2 (for
a moderate increase in compilation time.) You could also theoretically
compile with -O3 and -fno-inline-functions, but it'd be pretty pointless.
For more info, read the gcc docs (gcc.inf). (That's where I got all this. :)
John
- Raw text -