Selective Inlining
One of the most egregious deficiencies in C++ is the syntax and flexibility of its inlining mechanism. Although generally useful, it is painfully unsophisticated. There is no mechanism for selective inlining; that is, inlining a method in some places and not inlining it in other places. This makes inlining decisions an all or nothing choice, ignoring the reality of fast path optimization. For example, suppose a program's fast path (the typical execution sequence) contains two static invocations of a method that has an additional 20 static invocations outside the fast path. There is no simple mechanism for inlining the method in its two critical call locations and relying on the normal call mechanism for the remaining ones. ...
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