does 64bit perform better than 32bit?

Status
Not open for further replies.

fordy9

Distinguished
Jan 4, 2007
85
0
18,630
The only thing i seem to hear when 32bit and 64bit are compared are things to do with compatability. I know its easier to obtain drivers for 32bit Vista, but is there / will there be any performance gain when using 64bit compared to 32bit?
 
Solution
The obvious answer is "because 64 bit OS's can address more than 4GB of RAM". But there's a bit more to it than that:

From: http://en.wikipedia.org/wiki/64-bit


A common misconception is that 64-bit architectures are no better than 32-bit architectures unless the computer has more than 4 GB of memory. This is not entirely true:

■Some operating systems reserve portions of process address space for OS use, effectively reducing the total address space available for mapping memory for user programs. For instance, Windows XP DLLs and userland OS components are mapped into each process's address space, leaving only 2 to 3.8 GB (depending on the settings) address space available, even if the computer has 4 GB of RAM. This...
I've run both, on the same hardware, and in my experience, Vista 64 - In And Of Itself - is noticably faster than Vista 32. Not an earthshaking difference... But noticably snappier.

Having said that, nearly all consumer apps are 32 bit and (obviously!!) we are less concerned about how the OS performs by itself than we are about how fast our apps (GAMES!!) run on it. From my User-level understanding: Here Vista 64 has extra work. It has a set of libraries which it uses to 'translate' the 32 bit software to a 64 bit environment. There is obviously some overhead due to this, since (in effect) you are running your 32 bit app inside a container. On the positive side: Many common 32 bit commands can be run in pairs as a single 64 bit instruction. The rule being that both 32 bit commands have to be short enough that there is still room enough in a 64 bit string for the commands *and* the necessary tags needed to differentiate the two. This is the same general process used to run 32 bit apps in XP64. Vista's version has been reworked from the XP version, and in practice 32 bit apps seem to run at about the same speed on Vista 64 as they do in Vista 32. A little quicker sometimes, a little slower other times - it depends on what you happen to be doing at the moment.
 
The obvious answer is "because 64 bit OS's can address more than 4GB of RAM". But there's a bit more to it than that:

From: http://en.wikipedia.org/wiki/64-bit


A common misconception is that 64-bit architectures are no better than 32-bit architectures unless the computer has more than 4 GB of memory. This is not entirely true:

■Some operating systems reserve portions of process address space for OS use, effectively reducing the total address space available for mapping memory for user programs. For instance, Windows XP DLLs and userland OS components are mapped into each process's address space, leaving only 2 to 3.8 GB (depending on the settings) address space available, even if the computer has 4 GB of RAM. This restriction is not present in 64-bit Windows.

■Memory mapping of files is becoming less useful with 32-bit architectures, especially with the introduction of relatively cheap recordable DVD technology. A 4 GB file is no longer uncommon, and such large files cannot be memory mapped easily to 32-bit architectures; only a region of the file can be mapped into the address space, and to access such a file by memory mapping, those regions will have to be mapped into and out of the address space as needed. This is an issue, as memory mapping remains one of the most efficient disk-to-memory methods, when properly implemented by the OS.

■There may be other incidental advantages as a result of the transition - for example, in the case of x86-64 compared to x86, twice as many registers are available for programmer use.

The main disadvantage of 64-bit architectures is that relative to 32-bit architectures the same data occupies slightly more space in memory (due to swollen pointers and possibly other types and alignment padding). This increases the memory requirements of a given process and can have implications for efficient processor cache utilization. Maintaining a partial 32-bit model is one way to handle this and is in general reasonably effective. In fact, the highly performance-oriented z/OS operating system takes this approach currently, requiring program code to reside in any number of 32-bit address spaces while data objects can (optionally) reside in 64-bit regions.

Currently, most commercial software is built as 32-bit code, not 64-bit code, so it can't take advantage of the larger 64-bit address space or wider 64-bit registers and data paths on 64-bit processors, or, on x86 processors, the additional registers in 64-bit mode. However, users of free or open source operating systems have been able to use exclusive 64-bit computing environments for years. Not all such applications require a large address space or manipulate 64-bit data items, so they wouldn't benefit from the larger address space or wider registers and data paths; the main benefit to 64-bit versions of applications that wouldn't benefit from them would be that x86 versions would be able to use more registers.
 
Solution
Status
Not open for further replies.