When you write a function or call a library function, consider the following guidelines:
Usually, you should not declare all your virtual functions
inline. If all virtual functions in a class are inline, the virtual
function table and all the virtual function bodies will be replicated
in each compilation unit that uses the class.
When declaring functions, use the const specifier
whenever possible.
Fully prototype all functions. A full prototype gives
the compiler and optimizer complete information about the types of
the parameters. As a result, promotions from unwidened types to widened
types are not required, and parameters can be passed in appropriate
registers.
Avoid using unprototyped variable
argument functions.
Your functions are automatically mapped to built-in functions
if you include the XL C/C++ header
files.
Your functions are mapped to built-in functions
if you include math.h and string.h.
Avoid virtual functions and virtual inheritance unless required
for class extensibility. These language features are costly in object
space and function invocation performance.