|
-
March 16th, 2005, 10:27 AM
#3
Re: Performance Cost
While it is very likely that GetNum() will be inlined by the compiler, there is no way to force the compiler to inline a chunk of code. Some compilers don't even support inlining of functions. If the compiler didn't inline the function, you'd have the overhead of a function call; whether this is a big deal depends on how often you call the function.
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
|