Announcement

Collapse
No announcement yet.

Comparing 64bit and 32bit CPU benchmark results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Comparing 64bit and 32bit CPU benchmark results

    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.

    Code:
        //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
    If the same C++ code is recompiled to target a 64bit CPU, then the machine code looks something like this.

    Code:
        //64bit addition on a 64bit CPU
        mov rax,qword ptr [i64val2]
        mov rcx,qword ptr [i64val1]
        add rcx,rax
        mov qword ptr [i64j],rcx
    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]

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

  • #2
    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
    PerformanceTest V6 build 1005 32bit / 64bit was used for testing.

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

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

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

    TEST: CPU - Data compression
    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 Additional registers. 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

    Comment


    • #3
      clear and well done

      Well done and right on the mark..

      As an owner of an Amd64 (FX-55) and a speed freak.. I also conclude with your findings.. I would like to add one BUT to all that speed

      I have spent hours and hours working with X64 -- and unless you are prepared to spend your days trying to make your computer work you will find you now have a very fast computer that you can't work with (YET) - mostly for lack of ported software and or missing drivers...

      the only item I would disagree with is running x32 programs in x64 - it is clearly posted by Microsoft that x32 programs WILL run slower on x64 the only advantage is access to 32gb of ram.. will everyone with more than 4gb of ram please stand up...... yeah thought so.. will everyone who's motherboard will accept more than 4gb of ram please stand up.... yeah --- if you have no idea what I was talking about.. x64 is not for you.


      the big killer is going to be your video card and drivers, even if there is a driver for x64 for your card it might not be a fully optimizied version or it may lack all or some of the special features that make it work so well in Xp

      I have gone through 3 video cards now.. 2 from Matox and 1 Nvidia - as of this date yes they have drivers for x64.. but no access to ANY of the cards features meaning unless you can do it via window - those options are missing, (for now) the proper drivers should be released in the next 3-4 months

      effects.. for me with a 3 monitor system its so bad without dedicated software for color control and monitor switching even the speed gain is not worth the pain of working with a hobbled machine

      .. this also goes for sound cards... just because x64 can turn it on, make sure that the full features can be accessed.. example my SB Live can be found by X64 and will work is a basic way - but until creative releases the drivers (not expected for 3-4 more months) forget advanced options found in XP like surround, off loading decoding to the sound card, digital I/O

      I have a list of things that you trade off... for now .. so depending what you really need the speed for (I video edit/encode and I even gave up) x64 is just a toy to make benchmarks with its not practical.. yet


      Photohammers 3 rules before you x64 it

      1- make sure you have your video and lan drivers on CD during instal do not count on being able to access networks or harddrives until your done and you don't want a failure 2 hours into the job because you need a driver that could have fit on a floppy disk

      2- don't count on it.. if it has to work it won't, if your in a time crunch forget it. if its not backed up and the backup has been tested your screwed

      3- beyond the normal backup - x64 is a bully and expect no quarter.. unplug ALL drives that you expect to keep thats right UNPLUG them why because x64 is going to format your drive before installing but another note as per Microsoft fine print x64 might not correctly identify your drives so while you think its installing in your new blank drive its really formated and installed itself over all the data you so carefully moved to your 2nd drive -- and just for fun x64 WILL reset the MBR of ANY AND ALL drives it finds that have OS's other than x64 - no warning, no prompt and once the Master Boot Record is gone.. its a brand new BLANK unformated drive...

      these are lessions learned the hardway.... so ahead take the fast easy way, it's just an updated XP... yeah my suggestion is Active Undelete or R-Studio to help you get your data back they have saved my whoops I formated 3 years of data butt a few times

      last note about that backup data - remember your drive has now been x64'ed so it MUST be a FULL DRIVE restore since the OS will reject restoring a folder (it will error telling you the information is probly fine but it is for another version of windows) and then it will exit... and that is if your backup spftware will load and run in x64

      have fun I sure did

      Mike Hammer, --> still willing to risk it all to gain a little speed
      mike hammer

      Comment


      • #4
        Yes, you have to be brave, deperate or a software developer to want to use Win64 for the moment. We have even seen Microsoft office fail to install on one of our Win64 machines.

        ---
        David

        Comment


        • #5
          Dude you make it seem so Tough to use or install x64. I've been using it since it came out. finding drivers can be tough. I've never experienced it formatting other drives. I like it.

          Comment


          • #6
            That previous post was written 7 months ago. Things have improved over the last 7 months. 64bit is pretty much usable now if you don't have old hardware (for which drivers are not available).

            Update Oct 2011:
            See this post for a lot more details of what is going on in the integer maths test on newer 64bit CPUs.
            http://www.passmark.com/forum/showthread.php?t=3348

            -----
            David

            Comment


            • #7
              The post was written back in 2005. Which was a period when 64bit was the bleeding edge and public knowledge of it was near zero. At the time it wasn't clear at all what the performance difference would be on various hardware and how Intel's and AMD implementation varied.

              So it deserved some deeper analysis. Of course 15 years later you can look back and say it the result is now obvious, but it wasn't at the time.

              Comment

              Working...
              X