Key Points
Inlining can improve performance. The goal is to find a program's fast path and inline it, though inlining this path may not be trivial.
Conditional inlining prevents inlining from occuring. This decreases compile-time and simplifies debug during the earlier phases of development.
Selective inlining is a technique that inlines methods only in some places. It can offset some of the code size explosion potential of inlining a method by inlining method calls only on performance-critical paths.
Recursive inlining is an ugly but effective technique for improving the performance of recursive methods.
Care needs to be taken with local static variables.
Inlining is aimed at call elimination. Be sure of the real cost of calls on your system before ...
Get Efficient C++ Performance Programming Techniques now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.