Profile-Based Inlining
There are some inlining decisions that seem trivial and some that have guaranteed positive results, and some recursive methods seem to cry out for better performance via call unrolling. The fact is, however, that we could invest a lot of effort into inlining a program, significantly increase its size and compile time, and see very little performance improvement, or even a performance degradation, for our trouble. Conversely, we could inline a couple of important methods and see a significant performance improvement. The difference between spinning our wheels inlining unprofitable methods and significantly improving the speed of our programs is the selection of the right methods for inlining. The best way of finding the ...
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.