Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty: Linux v Windows compilers

Author: Tom Likens

Date: 08:11:28 04/30/02

Go up one level in this thread


On April 29, 2002 at 21:33:38, Robert Hyatt wrote:

>On April 29, 2002 at 18:26:43, George Sobala wrote:
>
>>A question for Dr Hyatt (or anyone else!):
>>
>>I run a Linux system, and am disappointed with the performance of my
>>Linux-compiled versions of Crafty 18.xx versus the supplied precompiled Windows
>>versions. The Windows version is about 20% faster in kN/sec on the same position
>>running under Windows/NT 4.0 *in a VmWare 3.1 virtual machine running inside
>>Linux*, than the native Linux version itself (compiled with egcs 2.91.66 with
>>-O3 on a K6/2 460MHz 192Mb). Same hash table sizes.
>>
>>Am I doing something wrong with the compiles, or is egcs code really that
>>inferior to the Windows compilers?
>
>
>go out to www.intel.com, look for their C++ compiler for linux.  You can
>get a non-commercial license for no charge.  It produces the fastest Linux
>executable I have seen, way over 10% faster than the best gcc version I
>have (2.95.2)...

I'd second this, the new 6.0 version of the Intel compiler is a nice piece
of work.  It finally handles gcc inline assembly and a number of the gcc
extensions such as macros with a variable number of arguments etc. It also
includes long long support which is nice if your program uses bitboards.
I got a full 20% increase in the speed of my C++ program over gcc 2.95.2,
which was simply incredible (I may have to buy this thing :)

Your mileage will vary of course...

One thing to note, is that you'll more than likely want to do profile guided
optimization to get the most bang for your buck.  What this entails is that
you must first create an instrumented version of the program and then run it
under typical usage (i.e. play it, run various test suites against it etc.)
Once you've done that you will get out a *.dyn file that the compiler will
use to create the final (and very fast) executable.

The command line switches I used for the instrumented version were...
(note, my machine is an Athlon and the more aggressive -axK and -xK switches
cause seg faults)

-axM -xM -prof_genx

For the final version I used the switches:

-axM -xM -ip -prof_use

Inbetween the two compiles I let the first version play 100 5sec/move games
with itself plus ran a number of test suites against it.

good luck,
--tom








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.