O'Reilly logo

Efficient C++ Performance Programming Techniques by David Mayhew, Dov Bulka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Method Invocation Costs

To understand fully what is involved in the performance benefits of inlining, we must understand what is involved in a method invocation (procedure call) and return. This will help us to understand what we are avoiding and why its avoidance can significantly improve our programs' performance.

Most systems have three or four “housekeeping” registers: an Instruction Pointer (also frequently referred to as a Program Counter in spite of the fact that it does not count programs), a Link Register, a Stack Pointer, a Frame Pointer, and an Argument Pointer, or IP, LR, SP, FP, and AP, respectively. You may have noticed that we listed five registers but said that a system has three or four housekeeping registers. This is because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required