Inline ExpansionInlining

suggest change

Inline expansion (also known as inlining) is compiler optimisation that replaces a call to a function with the body of that function. This saves the function call overhead, but at the cost of space, since the function may be duplicated several times.

// source:

int process(int value)
{
    return 2 * value;
}

int foo(int a)
{
    return process(a);
}

// program, after inlining:

int foo(int a)
{
    return 2 * a; // the body of process() is copied into foo()
}

Inlining is most commonly done for small functions, where the function call overhead is significant compared to the size of the function body.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Optimization:
* Inline ExpansionInlining

Table Of Contents
8 Arrays
11 Loops
39 Streams
51 Unions
56 Lambdas
60 SFINAE
62 RAII
67 Sorting
84 RTTI
87 Scopes
104 Profiling
107 Recursion
117 Iteration
125 Alignment
133 Optimization
134 Semaphore
136 Debugging
139 Mutexes
142 decltype