Why Inline?

Inlining is probably the most significant mechanical performance enhancement technique available in C++. The performance of relatively large systems can be transformed rapidly, without rewriting anything. While working on a networking framework, we took a 10,000 line subsystem and improved its performance by more than an order of magnitude. The last step in the transformation involved inlining the working system. This last step took only two days and resulted in a 40% improvement in the system's performance. It took two days to do the inlining because the code was not designed from its inception for inlining. Had we employed what we now know about inlining during the development of this system, we would have been able to perform 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.