Solved

MSVC 2K5 - Difference between inline and intrinsic?

Posted on 2006-11-12
3
251 Views
Last Modified: 2008-02-01
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
Comment
Question by:Unimatrix_001
  • 2
3 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 17925636
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
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
ID: 17925671
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
 
LVL 3

Author Comment

by:Unimatrix_001
ID: 17925705
Thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now