Jump to content

Function inlining

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Dominus (talk | contribs) at 19:31, 25 October 2004 (to be merged with "In-line expansion"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Function inlining is an optimization technique to transform function calls into a code structure that takes less time to execute. It can be performed at several steps in the software building process.

Function inlining is performed by translating function calls to a particular routine into the full code of the routine. This removes the overhead of calling the routine (and, under some architectures, the overhead of creating a new stack frame). However, this increases the size of the compiled executable, which can lead to cache exhaustion and a resulting decrease in speed. Consequently, inlining is usually only used with short, commonly used routines.

See also