inline function

noun
UK /ˈɪnlaɪn ˈfʌŋkʃən/
US /ˈɪnlaɪn ˈfʌŋkʃən/

A small helper in a computer program that gets copied right where it is used.

The programmer marked the tiny function as an inline function so the program would run faster.


OTHER MEANINGS

2. A function defined inside a class in C++ that the compiler may expand at the call site.

Defining the getter as an inline function inside the class keeps the code short.

3. A function whose body is substituted directly into the calling code to avoid call overhead.

The compiler turned the small inline function into straight-line code.

4. A keyword hint in C or C++ suggesting the compiler insert the function body at each call.

He added the inline keyword before the function to suggest inlining.