by Jonathan » Tue Feb 17, 2004 11:51 pm
This is a reply to Peijen's inquiry about 64 bit computing.
There are really two aspects of 64 bit computing. There's using 64 bit instructions and primitives. There's also AMD's specific 64-bit extensions to the IA32 or x86 instruction set, hereafter referred to as x86-64.
The reason to move to 64 bits is simply address space. 32 bits let you address 4 GB of memory. In practice, this usually limited to 2 GB of memory due to operating system limitations. A 64 bit system has a much higher limit. A few workloads out there use integers larger than 4 billion, and these also benefit from 64 bits. Floating point code almost always uses doubles nowadays anyway, so we're already using 64 bits there. There is no advantage to moving to 64 bits for floating point.
That is it, the whole list of reasons to move to 64 bits. Any other advantage you may attribute to a 64 bit processor is implementation specific. Things like bus width are not mandated by the width of the processor's internal data paths.
The disadvantages of 64 bit processors are subtle. First, it requires a longer page walk to translate all 64 bits of your address. A smart TLB scheme can hide much of this impact. Your address pointers are now 64 bits in length. This will inflate your code size, which means your code takes up more room in the cache. Your instructions will also grow some, depending on implementation. The 64 bit extensions to the CISC x86 instruction set depend on a certain set of prefixes to be added to the instructions that use them, so binaries will be slightly larger in most cases.
The x86-64 specification has one other alteration from standard IA32. The architectural registers have been doubled, both in number and in size. Doubling them in size is a natural part of extending a 32 bit ISA to 64 bits. Doubling them in number is something AMD just decided to do. This results in fewer spills, which nets you some reduction in code size. Depending on the circumstances and implementation, this may also result in fewer memory accesses.
The Athlon 64 or Opteron processor implements these features. It also, among other improvements, has an integrated memory controller. The memory controller on other system sits in your motherboard's north bridge and coordinates stuff between the CPU and memory. An onboard memory controller generally reduces the average latency of a memory access. This can have a performance improvement. This benefit is not specific to 64 bit code.