Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question to 64 bit experts

Author: Robert Hyatt

Date: 12:42:16 01/19/05

Go up one level in this thread


On January 19, 2005 at 13:37:16, Rémi Coulom wrote:

>On January 19, 2005 at 13:23:50, Robert Hyatt wrote:
>
>>On January 19, 2005 at 11:55:43, Rémi Coulom wrote:
>>
>>>Hi,
>>>
>>>I am porting my chess program to 64 bit on an AMD64 Athlon processor. I have
>>>noticed that, with gcc, sizeof(int)=4. I would have expected sizeof(int)=8. On
>>>32-bit platforms, 32-bit variables are faster than 16-bit variables. I wonder if
>>>64-bit variables are faster than 32-bit variables on 64-bit machines. I have
>>>made a few experiments and did not notice much difference.
>>>
>>>Rémi
>>
>>
>>You aren't running a 64 bit gcc then.  And most likely are not running a 64 bit
>>operating system which is necessary before you can use a 64 bit compiler...
>
>Yes, I am using 64 bit gcc on a 64 bit linux. The output of "gcc -v" is:
>
>Reading specs from /usr/lib64/gcc/x86_64-mandrake-linux-gnu/3.4.1/specs
>Configured with: ../configure --prefix=/usr --libdir=/usr/lib64 --with-slibdir=/
>lib64 --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable
>-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --ena
>ble-clocale=gnu --disable-libunwind-exceptions --enable-languages=c,c++,ada,f77,
>objc,java --host=x86_64-mandrake-linux-gnu --with-system-zlib
>Thread model: posix
>gcc version 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)
>
>>
>>Not much difference in speed, unless you _need_ 64 bit values.  Then having to
>>do 2x32 on a 32 bit machine is slower than one 64 bit operation on the opteron.
>
>Thanks for your reply,
>
>Rémi


I may have been wrong.  I believe that on a 64 bit architecture, I use "long"
for a 64 bit data type, not int, so I am not sure what an int might be in
thinking about this more carefully...

I'll test it and see on one of our opteron boxes however.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.