|
-
November 8th, 2012, 08:09 AM
#7
Re: code in dot H files
 Originally Posted by MrViggy
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|