It is September 2005 and we have been doing testing on Windows 64bit with PerformanceTest 6 (PT6) and thought it was worth posting some of the results.
Our testing was done on a dual boot machine. So we could boot into Windows 2003 64bit or Windows XP 32bit and the hardware remained identical (P4 630 3Ghz 64bit, Hyperthreaded, 512MB RAM, Radeon x300 video, Intel D925XECv2 MB)
On Windows 2003 64bit we used PT6 64bit and for comparision we also ran PT6 32bit, which runs in the WoW. (WoW, Windows on Windows, simulates a 32bit environment for 32bit applications when running Windows 64bit. [WoW is not World of Warcraft]).
On Windows XP 32bit we used PT6 32bit. Of course the 64bit version of PT6 will not run on 32bit Windows.
Overall we found the 64bit version of Windows 2003 to be significantly faster (about 22%). This seemed to be the result of two factors. Firstly Windows 2003 has by default some desktop visual effects turned off (fading menus, shaded windows, drop shadows, etc..). As a result the 2D benchmark tests gave a higher result than on XP. The second and more interesting factor was that the CPU benchmark results came in about 30% higher in Windows 64bit.
Here are some example from the CPU tests. (higher numbers are better)
TEST: CPU - Integer Math
PT6 64bit, Win2003 64bit, Result = 193.3
PT6 32bit, Win2003 64bit, Result = 92.9
PT6 32bit, WinXP 32bit, Result = 92.9
TEST: CPU - Find Prime Numbers
PT6 64bit, Win2003 64bit, Result = 217.7
PT6 32bit, Win2003 64bit, Result = 158.2
PT6 32bit, WinXP 32bit, Result = 157.9
TEST: CPU - Data compression
PT6 64bit, Win2003 64bit, Result = 2584.6
PT6 32bit, Win2003 64bit, Result = 2578.6
PT6 32bit, WinXP 32bit, Result = 2582.77
So it can be been that 64bit applications (like PT6 64bit) can get a substantial boost in performance, but only some of the time. To determine why this might be the case we need to dig a bit deeper into the code.
It turns out that there are certain low level tasks which are quicker on 64bit systems. High level programming languages like C++, Basic & Java eventually all get turned into machine code before that are executed on the CPU. Machine code is the native programming language for a CPU and the speed these instructions are executed by the CPU determines the overall speed of the program being run.
For example, this is the machine code of a 64bit addition on a 32bit system, (code in C++ was i64j = i64val1 + i64val2 ) where all values are 64bit integers.
If the same C++ code is recompiled to target a 64bit CPU, then the machine code looks something like this.
//64bit addition on a 32bit CPU
mov eax,dword ptr [i64val1]
add eax,dword ptr [i64val2] //1st addition of 32bits
mov ecx,dword ptr [ebp-14h]
adc ecx,dword ptr [ebp-1Ch] //2nd addition of remaining 32bits
mov dword ptr [i64j],eax
mov dword ptr [ebp-24h],ecx
Notice that in the 2nd 64bit machine code example, only 4 instructions were required compared to 6 instructions required for the 32bit CPU. In both examples the same function is performed, adding two numbers together.
//64bit addition on a 64bit CPU
mov rax,qword ptr [i64val2]
mov rcx,qword ptr [i64val1]
mov qword ptr [i64j],rcx
The same efficiency gains are realised for multiplications, subtractions and just about any operation on a 64bit integer or 64bit floating point number. Obviously (and not surprisingly) the 64bit CPU is much more efficient at dealing with 64bit numbers, becuase of its wider bus and wider CPU registers.
This also explains why the Integer Math & Find Prime Numbers test results improved under 64bit while the Data compression results stayed more or less the same. Both the Integer Math & Find Prime Numbers tests make some use of 64bit data, while the Data compression test uses of 32bit data.
Further, we can expect some improvement in applications that use Streaming SIMD Extension instructions (SSE) that have be moved to 64bits. SSE instructions are used in video and audio applications and operate on 64 or 128bit data. [SIMD = Single instruction multiple data]
- Don't expect your existing 32bit applications to run any faster on 64bit Windows.
- The WoW emulation doesn't noticeable slow 32bit applications in 64bit Windows.
- 32bit applications that use 64bit data should be faster when re-compiled to a native 64bit application