Of course it is enabled with optimizations only. If you do not enable optimizations, the compiler will leave the code alone - not make any changes.
It does make sense to have it on when...
Type: Posts; User: Elysia
Of course it is enabled with optimizations only. If you do not enable optimizations, the compiler will leave the code alone - not make any changes.
It does make sense to have it on when...
There should be other compilers that can fix this, but even if they cannot, even if you DO put inline there, it most likely will be ignored by the compiler because it simply cannot make a good guess...
But that is just the thing - you cannot control what to inline and not, because a compiler is not required to listen to your inline. It is more of a suggestion, and the compiler probably does it...
No. Certain compilers have link time optimizations. Visual C++ comes to mind.
But besides that, inlining is only a suggestion to a compiler. It does not guarantee it will inline the function.
So...
There would be a simple answer to this: let the compiler handle the inlining. The compiler generally knows best what to inline and not.
Compile with a good compiler with aggressive inlining settings...