Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: C optimization: int vs char

Author: Dann Corbit

Date: 10:10:49 10/17/01

Go up one level in this thread


On October 15, 2001 at 14:23:46, Frank Phillips wrote:
>On October 15, 2001 at 05:56:20, David Blackman wrote:
>>> I am predicting double the speed.
>>>
>>>Note that I am not talking about the KAP compiler for Linux (but rather) the
>>>Intel C++ compiler 6.0 for Linux (which is now in beta).
>>
>>Double would be bloody amazing for chess code. I could understand it some kinds
>>of floating point on the grounds that:
>>
>>1. Floating point on the X87 is really ugly
>>2. Gcc doesn't try very hard
>>3. If anyone can figure out how to make this mess go fast, it should be Intel.
>>
>>For the integer stuff, gcc is not great, but it's not all that bad either. It's
>>mostly about half way between Borland and Microsoft, though occasionally it
>>manages to beat both. I haven't heard anyone claim the Intel compiler is twice
>>as good as that. I've spent a fair while staring at inside loops of various
>>stuff generated by gcc, and in most cases, there is no way anything is going to
>>go twice as fast on the same chip.
>>
>>That said, i will probably try to get hold of this if it isn't to huge.
>
>After something of a struggle (my ISP automatically disconnects after two hours
>and at less than 56k/s it takes longer) I finally got the Intel compiler down
>and working.
>
>I am impressed.  It is certainly not twice as fast but faster.  On my program
>and the little fixed ply search test I do to check that I still get the same
>number of nodes when they should not have changed, the comparison is:
>gcc2.96        403knps
>intel          467knps
>(MSVC++        522knps)
>
>The executable has increased in size to 830kB.  If I link it statically it goes
>to 2.52MB.
>
>The executables use Intel libraries, so you have to set up the environment
>variables.  If anyone knows how to do this at boot, rather than through the
>users.bashrc file, please let me know.
>
>Anyway, thanks for the tip Dan.

If the Linux version of the C++ compiler works like the PC version, there are a
lot of options to play with.  Especially important are trying various
combinations of target chip, iter-procedural optimization, and whole-program
optimization.  You can get quite a bit more out of it than is delivered by the
default settings.  Using profile guided optimization and a link-order list is
also worth a try.  By various combinations, you might be able to get a much
larger boost.



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.