Optimization - Inlining a Function

Introduction
Calling a function may imply a large overhead in the processor because the function call and return operations and passing the arguments are expensive operations. Sometimes we can inline these functions so their calculations will be evaluated in the body of the calling subroutine and without an explicit function call, in order to increase performance of the code.