Wednesday, February 20, 2008

Inline functions in C++

The inline specifier denotes the compiler that inline substitution is preferred to the common function call mechanism for a definite function. This does not vary the behavior of a function itself, however is used to suggest to the compiler that the code generated by the function body is inserted at each point the function is called, sooner than being inserted only once and carry out a regular call to it, which normally involves some other overhead in running time.

No comments: