Hanoi towers as a pure recursion benchmark, part 2 - Code Optimizations
As an aside from the 1st part, we try to optimize the performances of the solutions found in part 1, with special attention to the assembly version.
First, let’s take two timings of the versions presented in part 1, compiling in release with optimizations turned on, running on an Athlon64 3000+ 1.8GHz and with times taken with timeGetTime.
These are the times (native C++, assembly) :
- Assembly : 1012ms
- C++ : 1605ms
There are a couple of optimization we could try to make the code faster.
June 1, 2005 | Filed Under C++, Programming, x86/64 (amd64) specific, x86/ia32 specific | 2 Comments