Re: [LAU] OT: 32-bit vs 64-bit speeds

From: Erik de Castro Lopo <mle+la@email-addr-hidden-nerd.com>
Date: Mon Feb 04 2008 - 09:36:39 EET

david wrote:

> Just curious, but I've heard that 64-bit OSes are slower than 32-bit
> ones. That seems odd to me. Any truth to it?

Swings and roundabouts.

On architectures like Sparc where the 32 and 64 bit CPUs have the same
number of registers, the 64 bit OS is likely to be a little slower
on operatrions like traversing linked lists because each pointer is
twice as big on 64 bit and hence each retrieval of a pointer requires
twice as much memory bandwidth as the 32 bit OS.

When comparing 32 bit x86 to x86-64, things are less clear because the
x86-64 has two more registers than the 32 bit version of the CPU which
is considered rather register starved (in comparison to other CPUs like
Sparc and PowerPC). The problem with register starvation is that the
compiler has move data from registers to the stack to free up register
space and this register spilling can slow down the program.

The extra registers means that code written in the Ocaml programming
language runs faster on x86-64 than on the 32 bit version of the
program.

Of cource all of the above assumes things like memory bus widths and
bandwidths are the same. Newer CPUs are more likely to be 64 bit and
have faster busses etc.

HTH,
Erik

-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Arguing that Java is better than C++ is like arguing that
grasshoppers taste better than tree bark." -- Thant Tessman
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Mon Feb 4 12:15:02 2008

This archive was generated by hypermail 2.1.8 : Mon Feb 04 2008 - 12:15:02 EET