Posts Tagged ‘assembly code’

C++ Performance – Counting Clocks

Performance computing can be an interesting task to undertake, as it lets us get under the hood of a complex abstraction (C++) and talk to the machine directly.

In the next two posts we’ll take a look at the Fibonacci algorithm used in a few other posts and see just how fast we can make it by looking at loop implementation, data type usage, and assembly code optimizations. In this first post we’ll take a look at some basic timing code, what gcc will do for us using the -O2 flag, then in the second post, see what we can do (if anything) to improve upon the generated code.

Read More