< Previous | Contents | Next >
There’s a small performance cost associated with calling a function. Normally, this isn’t a big deal because the cost is relatively minor. However, for tiny functions (such as one or two lines), it’s sometimes possible to speed up program performance by inlining them. By inlining a function, you ask the compiler to make a copy of the function everywhere it’s called. As a result, program control doesn’t have to jump to a different location each time the function is called.