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
LVL 3
Unimatrix_001Asked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
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
 
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
 
Unimatrix_001Author Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.