T
Tomás
The common persuasion is:
Big function -- leave it outline.
Small function -- make it inline.
In code I'm writing at the moment, I have a fairly long function, so it
wouldn't cross my mind to make it inline. However, the function is
invoked only once, and its invokation is at the very beginning of the
program's execution.
Regardless of a function's size, would it not make sense to make it
inline if it's only called once, so that it's code is "expanded in-
place" rather that there being some sort of memory redirection?
Should I stick to the formula of "Big=outline, Small=inline" and simply
rely on the compiler to expand the code in-place if the function is only
invoked once?
-Tomás
Big function -- leave it outline.
Small function -- make it inline.
In code I'm writing at the moment, I have a fairly long function, so it
wouldn't cross my mind to make it inline. However, the function is
invoked only once, and its invokation is at the very beginning of the
program's execution.
Regardless of a function's size, would it not make sense to make it
inline if it's only called once, so that it's code is "expanded in-
place" rather that there being some sort of memory redirection?
Should I stick to the formula of "Big=outline, Small=inline" and simply
rely on the compiler to expand the code in-place if the function is only
invoked once?
-Tomás