Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: the winner is: function pointer :)

Author: Gerd Isenberg

Date: 15:33:28 07/09/03

Go up one level in this thread


On July 09, 2003 at 17:28:59, Ricardo Gibert wrote:

>On July 09, 2003 at 17:02:09, Gerd Isenberg wrote:
>
>>Hi Jeremiah,
>>
>>Yes, also on Athlon xp2.8+ with MSVC 6 - little surprise due to the call
>>overhead. But "switch" is a bit size optimized, some jumps to common case code.
>>I used __assume(0) in switch default cases (Reinhard, Tim and switch256, Heiner
>>requires explicit case -1: donothing) to avoid one additional conditional jump
>>before the indirect switch jump.
>>Anyway funcp is fastest most often - all these tiny, very cache friendly
>>functions are 16 Byte aligned (with a lot of nops inbetween).
>>
>>But there is of course some "noise" in this dumb loop test, based on the order
>>of funcp-functions and "bad" random numbers. Of course no serious test - just an
>>instructional fun contest. The "surprise" for me is that the simple approach
>>seem to outperform Andrew's approach, may be due to the higher bits have no
>>higher probability with the low density numbers.
>>
>>Even if it's a kind of "perverse", i like Heiner's approach very much, with the
>>"cases" in deeper and deeper nested if-blocks.
>
>I still like simple. Easy to write, easy to modify, easy to read, easy to debug
>and performance-wise far from being terribly outclassed by the fancier tries and
>when you consider that Uri has admitted it would only get called 2 times per
>position...
>

That's all true. I am a bit surprised about "simple".

But the fascinating thing with Heiner's routine is the genius combination of a
nested bisection control structure with fast inputs and outputs for rarely
populated numbers. One may use it like a pattern or template ;-)

Gerd



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.