Inline expansion, usually called inlining, is a compiler optimization, or a manual edit by a programmer, that replaces a function call site with the body of the function being called. It resembles macro expansion, but it happens during compilation without changing the source text, whereas macro expansion happens before compiling and produces different text that the compiler then processes. Inlining is an important optimization with complex effects on performance. As a rule of thumb, a modest amount of inlining improves speed at a very small cost in space, but too much inlining hurts speed because the inlined code occupies too much of the instruction cache, and it also costs significant space. The academic literature on the technique from the 1980s and 1990s is surveyed by Peyton Jones and Marlow in 1999.
Connections
In Field
Source Inline expansion (Wikipedia)
Sources
Inline expansion (Wikipedia)
In Group: Compiler and Language Implementation Techniques, Lead section
is a manual or compiler optimization that replaces a function call site with the body of the called function
In Field: Programming Language Theory, Lead section
is a manual or compiler optimization that replaces a function call site with the body of the called function
View the SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.