Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

MSVC 2K5 - Difference between inline and intrinsic?

Hi,

What's the difference between inline and intrinsic functions? From what I can tell they both seem to instead copy the function contents to where it would be called to prevent function call overhead?

Thanks,
Uni
0
Unimatrix_001
Asked:
Unimatrix_001
  • 2
1 Solution
 
jkrCommented:
There is none, see http://msdn2.microsoft.com/en-us/library/tzkfha43.aspx ("instrinsic"):

The intrinsic pragma tells the compiler that a function has known behavior. The compiler may call the function and not replace the function call with *inline* instructions, if it will result in better performance.
0
 
jkrCommented:
BTW, see also http://en.wikipedia.org/wiki/Intrinsic_function for one subtle difference

"Unlike an inline function though, the compiler has an intimate knowledge of the intrinsic function and can therefore better integrate it and optimize it for the situation."
0
 
Unimatrix_001Author Commented:
Thank you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now