Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Gerbil 64-bit Speedup

Author: Fabien Letouzey

Date: 09:20:55 03/30/04

Go up one level in this thread


On March 30, 2004 at 12:10:22, Slater Wold wrote:

>On March 30, 2004 at 10:49:27, Fabien Letouzey wrote:
>
>>On March 30, 2004 at 10:30:39, Slater Wold wrote:
>>
>>>On March 30, 2004 at 04:40:06, Fabien Letouzey wrote:
>>>
>>>>On March 30, 2004 at 04:25:25, Peter Fendrich wrote:
>>>>
>>>>>On March 30, 2004 at 01:35:13, Slater Wold wrote:
>>>>>
>>>>>>64-bit Gerbil compiled with -O2 -Og -Ot -Oy -Oi -Ob2 -GL:
>>>>>>
>>>>>>1,098,625 N/sec on opening position for 30s.
>>>>>>
>>>>>>32-bit Gerbil compiled with -O2 -Og -Ot -Oy -Oi -Ob2 -GL:
>>>>>>
>>>>>>1,094,747 N/sec on opening position for 30s.
>>>>>>
>>>>>>
>>>>>>32-bit Gerbil that comes with source:
>>>>>>
>>>>>>1,115,953 N/sec on opening position for 30s.
>>>>>
>>>>>
>>>>>What is 64-bit Gerbil - a re-write to 64-bit code or the same Gerbil on a 64-bit
>>>>>cpu?
>>>>>/Peter
>>>>
>>>>I think what Slater is doing is to compile source code with the same compiler in
>>>>32-bit and 64-bit modes and compare the speed.  I don't think he modifies the
>>>>source code in any way, so it is not a re-write.
>>>>
>>>>The tests are probably all made on the same 64-bit hardware.
>>>>
>>>>Fabien.
>>>
>>>Correct.
>>>
>>>I had planned to take the program with the slowest speedup, and try to clean it
>>>up for 64-bit.  Looking like Fruit, so far!  :)
>>
>>Maybe it's just that Fruit is perfectly optimised for 32-bit hardware ;)
>
>That much is obvious!
>
>>Any clue so far, apart from the index signed-extension thing?
>
>I am still trying to learn fruit.  It's no small program!  But yes, there are
>quite a few datatypes that don't run well in 64-bit.  Such as sint8, and others.

Be careful, about half of the code is not used (or not important).

I use small integers (8 and 16 bits) only for memory storage, in structs and
arrays.  You can make them bigger for instance in board_t (board.h).  Don't
forget that one goal in Fruit is to use little memory.  It is probable that
using ints everywhere would make it faster already.

As for moves, they are 16 bits and sorry I did not use move_t so it would be
tricky to change.  But things like that, I can do.

Normally for local variables and arguments (I always consider arguments as local
variables) I only use "normal" size (it is in the C spirit that "int" is
supposed to be fastest, so the unsigned-index stuff is really bad news).

Instead of trying to read the code, maybe you can just ask me how it does this
or that, or why I implemented it that way.  We should probably focus on data
struture, which is quite a small part anyway.

Fabien.




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.