Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Q: Improving Speed

Author: Vincent Diepeveen

Date: 11:34:06 07/18/99

Go up one level in this thread


On July 18, 1999 at 13:02:41, Robert Hyatt wrote:

>On July 18, 1999 at 11:19:05, Andrew Williams wrote:
>
>>On July 18, 1999 at 11:06:34, Andrew Williams wrote:
>>
>>>On July 18, 1999 at 10:00:42, Robert Hyatt wrote:
>>>
>>>>On July 18, 1999 at 03:17:02, Scott Gasch wrote:
>>>>
>>>>>What are the typical ways people use to improve the speed of the searching
>>>>>algorithm?  Here's what I have done: move ordering / history, memory pool for
>>>>>moves so I am not calling malloc/free, optimized my C as much as I can, save a
>>>>>pointer to the kings on a board representation so I do not have to search for
>>>>>them when looking for checks.
>>>>>
>>>>>And still the program is sluggish; it gets a little over 20,000 nodes/sec on my
>>>>>AMD K6-3 400.  For comparison I clocked TSCP on the same machine and it is
>>>>>getting about 15,000 nodes/sec.
>>>>>
>>>>>How can I speed this up more?  What is a good speed on this kind of hardware?
>>>>>
>>>>>Thanks,
>>>>>Scott
>>>>
>>>>
>>>>First thing to check is your compile options.  15K is _very_ slow.  It should
>>>>be 10x that for TSCP...
>>>
>>>
>>>Do you mean "2x that for TSCP"? I just tried mine and got approx 30Knps - this
>>>is on a K6-2 300. (The position I tried was after 1. e4 e5  2. Nf3 Nf6)
>>>
>>Oops! I pressed the submit button before I finished. I should have said that
>>this is using pgcc on Linux with optimization -O6. In order to run the test,
>>I changed think() to search do depth 6 instead of 4.
>>
>>Cheers
>>
>>Andrew
>
>
>Lose the -O6.  It is typically horrible.  I have found -O to be the fastest
>for what I do...

-O6 is 25% slower for DIEP than -O2 for PGCC
PGCC itselve is not faster than gcc bye the way, despite hard work of
Marc.

gcc itselve is 7% slower than msvc 5.0, msvc 6.0 another 1% faster than that.
gcc -mpentiumpro is 15% slower than
just gcc -O2, this although i have a pentium pro AND a PII450.

gcc -O3 is a few % slower than gcc -O2

Something gross is wrong with those compilers.

pentium pro instructions can of course not slow you down objectively,
but the trick is that -mpentiumpro doesn't give pentiumpro instructions,
but keeps 486 compatible... ...that's what you get with freeware
...although it's weird that msvc doesn't use pro instructions either,
and that's a commercial compiler!

Note that internal intel compiler normally (just -O2 and such)
is like 20% slower than msvc, but when turning on
pentium pro optimizations (pentium pro instructions!) then it's just
1.5% slower than msvc!

So pentium pro instruction sure can give something.

Has to do with the 512 entry BTB i bet in a PII processor.
512 entries ain't much, considering the huge number of
'if then else' in DIEP, and as we know mispredicted branches
can delay at least 9 clocks, but up to 25 clocks,
in the same time one might execute up to 75 instructions!

Greetings,
Vincent




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.