Quote Originally Posted by MrViggy View Post
If the function is small, then there is the slight advantage that the compile can 'inline' the function. However, I highly doubt the compiler can inline a function 150 lines long.
it won't inline 150lines of code. but...
it may optimize away most of those 150lines of code and only inline the bit it needs.

I have template functions (the fact they're templates really doesn't matter in this decision) that are much larger than 150lines, but where the compiler can extract only the short bit of code it needs when the function is 'called' with certain literal values.