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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access