An inline function is a function in C and C++ programming languages qualified with the keyword inline which tells the compiler to substitute the body of the function inline by performing inline expansion i.e. by inserting the function code at the address of each function call thereby saving the overhead of function invocation and return (register saving and restore) by avoiding a jump to a sub-routine. The keyword inline function is similar to a macro as the compiler places a new copy of the inline function in each place it is called. Inline functions run a little faster than the normal functions as function-calling-overheads are saved, however, there is a memory penalty. If an inline function is called 10 times, there will be 10 copies of the function inserted into the code. Hence inline functions are best for small functions that are called often. The member functions of a class, if defined within the class definition, are inlined by default (no need to use the inline keyword); otherwise, the keyword is needed. The compiler may ignore the programmer’s attempt to inline a function, mainly if it is particularly large.
This video is targeted to blind users.
Attribution:
Article text available under CC-BY-SA
Creative Commons image source in video
En esta página del sitio puede ver el video en línea Inline function de Duración hora minuto segunda en buena calidad , que subió el usuario Audiopedia 24 October 2014, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 3,807 veces y le gustó 5 a los espectadores. Disfruta viendo!