AidenShaw
macrumors P6
Hogwash - you've fallen for "The 64-bit Myth"
This is simply wrong - a fantasy based on the "bigger is better" belief (think "MHz Myth") and encouraged by Apple marketing.
Most programs will run *no faster* on 64-bit OS X, and many will run a bit slower compared to an identical 32-bit program running on a 32-bit OS X.
There are two main cases on OS X where a 64-bit CPU is an advantage over a 32-bit CPU of the same speed.
In the first case, note that a 32-bit program on a PPC970 can take advantage of 64-bit integers by using a compiler option - there's no need to have a 64-bit OS. So, 64-bit integers are independent of a 64-bit OS.
The second case is the only true performance advantage of having a 64-bit OS. Here I use "64-bit OS" to mean an OS that gives applications 64-bit virtual address pointers and an individual application can address more than 2 to 4 GiB of RAM in a flat virtual address space. (Due to OS requirements, many 32-bit Os limit the application to something less than 4 GiB - for example Windows limits an app to 3 GiB of user space)
The typical example of the second case is a database application. On a 32-bit machine, the database is limited to caching 2 GiB (or so) of data in memory, and has to go to disk when the cache is full. On a 64-bit machine, the cache can be 4, 8, 10 or more GiB - and the database runs faster because fewer disk accesses are needed.
Why a 64-bit OS can be slower than a 32-bit OS
The increased memory capability comes at a cost - pointers are 64-bits (8 bytes) instead of 32-bits (4 bytes). This has two disadvantages:
While this effect is usually quite small, some applications have a huge number of relatively small data structures with a number of pointers to other structures (e.g. doubly-linked lists, trees and meshes). Some applications can run significantly slower in 64-bit mode due to the larger pointers.
Summary - a 64-bit OS is of no advantage unless both...
It should be obvious that the database example won't run any faster unless you have the 6, 10 or more GiB of RAM installed. Same for almost any other 64-bit application - if it's not able to allocate more than 32-bits of RAM, it won't have any 64-bit advantage. And I used the word "both" because you don't need 64-bits for the system to support more than 4 GiB of RAM - Windows 32-bit supports up to 64 GiB of physical RAM per system.
Because of these factors, you should not be surprised when you discover that most programs won't be re-written for 64-bit addressing - they'll continue to be 32-bits forever. Why go to the expense and headache of developing and testing and support for 64-bits when your application won't need that much RAM?
Some exceptions....
As with most things in computer science, you can't use the words "all", "none", "always" and "never" when talking about a 64-bit OS. 😉
The above was written with OSX in mind, comparing a G4 to a PPC970. Some fuzzy points or counter-examples are:
Fight the 64-bit Myth !!
CholEoptera36 said:It's known by now (or atleast you'd think so) that running a 64-bit OS on a 64-bit processor will increase performance no matter what machine it's on, no matter what the usage is for.
This is simply wrong - a fantasy based on the "bigger is better" belief (think "MHz Myth") and encouraged by Apple marketing.
Most programs will run *no faster* on 64-bit OS X, and many will run a bit slower compared to an identical 32-bit program running on a 32-bit OS X.
There are two main cases on OS X where a 64-bit CPU is an advantage over a 32-bit CPU of the same speed.
- A program does extensive 64-bit integer operations
- An application can improve its speed by using more memory (> 2 to 4 GiB)
In the first case, note that a 32-bit program on a PPC970 can take advantage of 64-bit integers by using a compiler option - there's no need to have a 64-bit OS. So, 64-bit integers are independent of a 64-bit OS.
The second case is the only true performance advantage of having a 64-bit OS. Here I use "64-bit OS" to mean an OS that gives applications 64-bit virtual address pointers and an individual application can address more than 2 to 4 GiB of RAM in a flat virtual address space. (Due to OS requirements, many 32-bit Os limit the application to something less than 4 GiB - for example Windows limits an app to 3 GiB of user space)
The typical example of the second case is a database application. On a 32-bit machine, the database is limited to caching 2 GiB (or so) of data in memory, and has to go to disk when the cache is full. On a 64-bit machine, the cache can be 4, 8, 10 or more GiB - and the database runs faster because fewer disk accesses are needed.
Why a 64-bit OS can be slower than a 32-bit OS
The increased memory capability comes at a cost - pointers are 64-bits (8 bytes) instead of 32-bits (4 bytes). This has two disadvantages:
- It takes twice as much memory bandwidth to load and store pointers, which reduces the memory bandwidth available for other data and code
- Pointers occupy twice as much space in cache, reducing the effective amount of cache available for other data and code
While this effect is usually quite small, some applications have a huge number of relatively small data structures with a number of pointers to other structures (e.g. doubly-linked lists, trees and meshes). Some applications can run significantly slower in 64-bit mode due to the larger pointers.
Summary - a 64-bit OS is of no advantage unless both...
- You actually have more than 2 to 4 GiB of RAM installed
- You have individual applications that need more than 2 to 4 GiB of RAM each.
It should be obvious that the database example won't run any faster unless you have the 6, 10 or more GiB of RAM installed. Same for almost any other 64-bit application - if it's not able to allocate more than 32-bits of RAM, it won't have any 64-bit advantage. And I used the word "both" because you don't need 64-bits for the system to support more than 4 GiB of RAM - Windows 32-bit supports up to 64 GiB of physical RAM per system.
Because of these factors, you should not be surprised when you discover that most programs won't be re-written for 64-bit addressing - they'll continue to be 32-bits forever. Why go to the expense and headache of developing and testing and support for 64-bits when your application won't need that much RAM?
Some exceptions....
As with most things in computer science, you can't use the words "all", "none", "always" and "never" when talking about a 64-bit OS. 😉
The above was written with OSX in mind, comparing a G4 to a PPC970. Some fuzzy points or counter-examples are:
- For a system with between 2 GiB and 4 GiB of RAM, there may be some cases where a 64-bit OS lets a program use more memory than a 32-bit program due to operating system overhead issues.
- For x64 systems (Intel's EM64T and Athlon64/Opteron), the processor instruction set is very different in 64-bit mode. There are more general purpose registers and some new instructions. Therefore an x64 program could be faster even if it doesn't need lots of RAM.
- There are some "sparse addressing" algorithms that can use huge amounts of virtual memory, but very little real memory. Such a program could use 64 GiB of virtual memory, yet run happily on a 512 MiB system without paging.
- Some applications simply need more than 4 GiB to hold their data -- but since these won't run on a 32-bit system, it's not an issue of being "faster" on a 64-bit system. 🙂
Fight the 64-bit Myth !!