F 15. 64 bit versus 32 bit.
Andrew Haley
aph at redhat.com
Wed May 25 12:13:44 UTC 2011
On 05/25/2011 12:58 PM, Bill Davidsen wrote:
> Chris Adams wrote:
>> Once upon a time, Fernando Cassia<fcassia at gmail.com> said:
>>> Well guess what? 64 bit code is bigger (bigger pointers) and thus
>>> slower, because CPU cache is less effective, with bigger code.
>>
>> All other things being equal, that might be true. However, all other
>> things are NOT equal; pointer size is not the only different between
>> i686 and x86_64. The biggest gain is that x86_64 has a much larger
>> register set, so a lot of things don't have to hit RAM at all (and are
>> much faster).
Also, the ABI is much better, and this may be almost as significant.
> Unfortunately that biggest gain only occurs if the program logic is such that
> registers run out often.
Which, in the case of gcc-generated code, is most of the time. gcc
was originally written for, and still works best with, a machine with
16 or more general-purpose registers. 32- bit x86 only has five or
six registers to play with, and this just isn't enough for good code
generation. I don't think that Java has it very much easier.
Andrew.
More information about the users
mailing list