Sign in with
Sign up | Sign in
Your question

Comparing 64bit and 32bit CPU benchmark results

Last response: in CPUs
Share
September 5, 2005 6:12:35 AM

We have been doing testing on Windows 64bit with <A HREF="http://www.passmark.com/products/pt.htm" target="_new">PerformanceTest 6</A> (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 <A HREF="http://www.passmark.com/download/64bitsoftware.htm" target="_new">PT6 64bit</A> and for comparision we also ran PT6 32bit, which runs in the WoW. (WoW simulates a 32bit environment for 32bit applications when running Windows 64bit).

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)

<b>TEST: CPU - Integer Math</b>
PT6 64bit, Win2003 64bit, Result = 193.3
PT6 32bit, Win2003 64bit, Result = 92.9
PT6 32bit, WinXP 32bit, Result = 92.9

<b>TEST: CPU - Find Prime Numbers</b>
PT6 64bit, Win2003 64bit, Result = 217.7
PT6 32bit, Win2003 64bit, Result = 158.2
PT6 32bit, WinXP 32bit, Result = 157.9

<b>TEST: CPU - Data compression</b>
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.

<i> //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</i>

If the same C++ code is recompiled to target a 64bit CPU, then the machine code looks something like this.

<i> //64bit addition on a 64bit CPU
mov rax,qword ptr [i64val2]
mov rcx,qword ptr [i64val1]
add rcx,rax
mov qword ptr [i64j],rcx</i>

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.

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]

<b>Conclusion</b>
- 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

------
David
PassMark Software
http://www.passmark.com
September 5, 2005 6:28:43 AM

A great answer to an old question. Thankyou David. It would be nice to see, and compare results with an A64 3000, to see how 64bit execution differs between the 2.
September 6, 2005 8:08:49 AM

A few people were interested to know if the results obtained above, for the Intel 630 CPU, also applied to AMD CPUs.

Here are the results from similar tests done on a dual boot AMD machine. The specs of the machine are, Dual AMD Opteron 244 (1.8Ghz), 2GB RAM, Dual Quadro FX 3400 SLI video, nForce4 MB, 10K SCSI + SATA RAID).
Boot OS 1: Windows XP 32bit
Boot OS 2: Windows 2003 server standard 64bit
<A HREF="http://www.passmark.com/products/pt.htm" target="_new">PerformanceTest V6</A> build 1005 32bit / 64bit was used for testing.

A few sample results are included below (bigger numbers are better),

<b>TEST: CPU - Integer Math</b>
PT6 64bit, Win2003 64bit, Result = 210.0
PT6 32bit, Win2003 64bit, Result = 111.6
PT6 32bit, WinXP 32bit, Result = 112.7

<b>TEST: CPU - Find Prime Numbers</b>
PT6 64bit, Win2003 64bit, Result = 254.7
PT6 32bit, Win2003 64bit, Result = 192.4
PT6 32bit, WinXP 32bit, Result = 191.8

<b>TEST: CPU - Data compression</b>
PT6 64bit, Win2003 64bit, Result = 4846.1
PT6 32bit, Win2003 64bit, Result = 3244.5
PT6 32bit, WinXP 32bit, Result = 3125.6

As with the Intel results there was a marked performance improvement when running native 64bit code on the 64bit O/S. Overall, across all the CPU benchmark tests, the improvement was 23% for the AMD machine. But some results like the Integer Math test had a much more dramatic improvement (up 87%).

Interestingly the Data compression test also showed a marked improvement when moved to 64bit (up 55%). This didn't happen on the Intel CPU. So clearly there are several factors that determine amount of performance gain you get when moving to 64bit code and the effect of these factors is unequal on AMD and Intel CPUs.

In addition to the size of the data being processed another significant factor determining the speed gain, is the use of the <b>Additional registers</b>. 64-bit CPUs makes 8 additional 64-bit general purpose registers and 8 additional XMM floating point registers available to applications. (A register is an memory storage location inside the CPU used to hold data). A good compiler will make use of these additional registers to avoid moving data back and forward from main RAM. It can also allow for faster function calls because function parameters can be passed via registers (and not on the stack in RAM). How much impact these extra registers have will depend on your code. Code using many variables with lots of small function calls and a good optimizing compiler would probably benefit the most.

More conclusions
- There are several factors influencing how big the performance gain of moving to 64bit.
- Some code may get zero benefit from 64bit, other code might get 100%+ performance gain.
- The CPU performance gains when moving to native 64bit code are not equal on 64bit Intel and AMD chips. AMD up 23% & Intel up 30%, overall.

------
David
PassMark Software
http://www.passmark.com
Related resources
September 6, 2005 5:07:58 PM

Quote:
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.

You mean a 64-bit CPU can handle native 64-bit operations faster than emulating 64-bit mathematics on a 32-bit CPU by using 2x32-bit math? Yeah. You're right. It doesn't get much more obvious than that. Just as it's also as obvious that pure 32-bit applications won't run any faster just because a processor can support native 64-bit operations. I'd never imagined that it would take such long posts just to state something so obvious.

:evil:  یί∫υєг ρђœŋίχ :evil: 
<font color=red><i>Deal with the Devil. He buys in bulk.</i></font color=red>
@ 197K of 200K!
September 7, 2005 3:00:57 PM

<pre><font color=orange> ∩_∩
Ω Ω
(=¥=)</font color=orange> - Cedrik is insulted to be called a cat when he's clearly a bunny.<font color=orange>
_Ū˘Ū_</font color=orange></pre><p> :evil:  یί∫υєг ρђœŋίχ :evil: 
<font color=red><i>Deal with the Devil. He buys in bulk.</i></font color=red>
@ 197K of 200K!
!