Search code examples
programming-languages64-bit

If a programming language is 64bit, does that mean it is better than 32bit?


If a language says it has 32bit or 64bit (php or other), does that mean that 64bit is somehow "better"? Is it faster? More reliable?


Solution

  • “A 64-bit compiler” usually means that it is generating instructions from the x86-64 instruction set instead of the IA-32 instruction set. The former is more modern and benefits from more experience in the design of efficient instruction sets. On the other hand, the same L1 cache (resp. L2 cache, L3 cache, cacheline) fits only half as many 64-bit words as it fits 32-bit words. In practice, performance is about the same, and memory use is higher with 64-bit instructions, but 64-bit programs are not limited to 4GiB of virtual memory space like 32-bit programs are.