title: Are 64 bit programs bigger and faster than 32 bit versions?
body: <p>I suppose I am focussing on x86, but I am generally interested in the move from 32 to 64 bit.</p>
  
  <p>Logically, I can see that constants and pointers, in some cases, will be larger so programs are likely to be larger. And the desire to allocate memory on word boundaries for efficiency would mean more white-space between allocations.</p>
  
  <p>I have also heard that 32 bit mode on the x86 has to flush its cache when context switching due to possible overlapping 4G address spaces.</p>
  
  <p>So, what are the real benefits of 64 bit?</p>
  
  <p>And as a supplementary question, would 128 bit be even better? </p>
  
  <p>Edit:</p>
  
  <p>I have just written my first 32/64 bit program. It makes linked lists/trees of 16 byte (32b version) or 32 byte (64b version) objects and does a lot of printing to stderr - not a really useful program, and not something typical, but it is my first.</p>
  
  <p>Size: 81128(32b) v 83672(64b) - so not much difference</p>
  
  <p>Speed: 17s(32b) v 24s(64b) - running on 32 bit OS (OS-X 10.5.8)</p>
  
  <p>Update:</p>
  
  <p>I note that a new hybrid x32 ABI (Application Binary Interface) is being developed that is 64b but uses 32b pointers. For some tests it results in smaller code and faster execution than either 32b or 64b. </p>
  
  <p><a href="https://sites.google.com/site/x32abi/" rel="noreferrer">https://sites.google.com/site/x32abi/</a></p>