32 or 64??
Clemens Eisserer
linuxhippy at gmail.com
Mon Feb 1 18:49:16 UTC 2010
Hi Odd,
> It doesn't use much more memory.
Pointers which consumed 32-bit now consume 64-bit.
No way how you twist it, your data-size will be larger.
How much larger depends on the amount of pointers you store in heap.
Typial Java enterprise apps consume about ~30% more, due to their
pointer-heavy nature, and take a quite noticeable performance hit.
(Sun implemented a clever optimization to use 32-bit pointer if you
use less than 32GB heap, because their pointers are 2-word alligned -
which brings performance back to x86 levels).
> In some cases 64 bit code uses less
> memory than 32 bit code, due to the added 8 general purpose registers.
> Those give more flexibility in making optimized code, which would not
> have been possible on x86
Are we talking about I or D size? D size will always be larger.
Fir I size, quite true the 8 additional registers save a few
load/stores - but I've never found a program which was smaller when
compiled for amd64.
So basically you have 8 addtional registers on one side, and larger
code and data size on the other one stressing memory/cache subsystems
more. For general purpose apps, sometimes amd64 is faster, sometimes
x86.
Bottom line is, an average user shouldn't worry installing a 64-bit
distribution, just because of better performance.
- Clemens
More information about the ubuntu-users
mailing list