Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fruit 1.0 64-bit

Author: Robert Hyatt

Date: 14:08:26 03/27/04

Go up one level in this thread


On March 27, 2004 at 07:16:03, Fabien Letouzey wrote:

>On March 26, 2004 at 11:50:04, Robert Hyatt wrote:
>
>>On March 26, 2004 at 09:15:12, Fabien Letouzey wrote:
>>
>>>On March 26, 2004 at 09:13:12, Fabien Letouzey wrote:
>>>
>>>>On March 26, 2004 at 09:07:18, Slater Wold wrote:
>>>>
>>>>>On March 26, 2004 at 08:50:51, Fabien Letouzey wrote:
>>>>>
>>>>>>>>I find it interesting; do you feel like investigating?
>>>>>>>
>>>>>>>Yes.  I can, and will.  I started looking last nite, but ran out of time.
>>>>>>
>>>>>>It's not urgent of course, but I think we've got something to learn.
>>>>>>For instance a way not to do things for 64-bit platforms :)
>>>>>>
>>>>>>>>One drawback of 64-bit ints and pointers is that they could take more space in
>>>>>>>>memory, but I thought I carefully avoided that everywhere ...
>>>>>>
>>>>>>>I am not sure what's slowing it down.  I could clearly see why it might not get
>>>>>>>a huge speedup, but the 10% slow down is confusing.
>>>>>>
>>>>>>I pass many pointers as function arguments (for instance I pass a pointer to the
>>>>>>board everyhere instead of using a global variable).  To me an argument is the
>>>>>>same as a local variable, and the slow down is very small on 32-bit platforms I
>>>>>>am sure.
>>>>>
>>>>>This was my first guess.  You cannot cast pointers to int, long, ULONG, or DWORD
>>>>>in 64-bit.  And there's a whole slew of other things to look at, also.
>>>>
>>>>I don't do any tricks with pointers, I don't even store them in any struct or
>>>>array (only local variables, that's registers or stack).  I just pass them as
>>>>argument; no pointer arithmetic ...
>>>>
>>>>>It very well maybe a part of it, but I think investigating the pointers,
>>>>>arguments, and variables is a better place to start.
>>>>
>>>>Well if profiling reveals a clear difference between the 32-bit and 64-bit
>>>>version that would be easy.  Of course I am expecting no such thing.
>>>>
>>>>Alternately, I could read the AMD 64-bit recommendations looking for something
>>>>that I do differently.  I didn't bother because Fruit does not use bitboards.
>>>>
>>>>Fabien.
>>>
>>>Would there be a reason why, for instance, 16-bit integers would be slower in
>>>64-bit mode?
>>>
>>>Fabien.
>>
>>
>>Yes.  16/32 bit ints require sign-extension.  signed things are a problem...
>
>Could this explain an overall 10% slow down (assuming many array accesses)?
>
>Fabien.


Yes.  All array addresses are going to be 64 bits.  If you use shorter indices,
they have to be sign-extended...




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.