The cost of a function call
Summary
Inline function calls can dramatically reduce overhead when the function is simple and the compiler uses SIMD. The article's benchmarks show inline functions can be over 20x faster in some cases, but for more complex or input-dependent code like counting spaces in a string, inlining may not help. Takeaways include: short, simple functions are good inlining candidates; use input size and function complexity to decide; source code is available.