Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: IA-64 vs OOOE (attn Taylor, Hyatt)

Author: Matt Taylor

Date: 16:40:45 02/13/03

Go up one level in this thread


On February 13, 2003 at 14:20:19, Tom Kerrigan wrote:

>On February 12, 2003 at 23:20:52, Matt Taylor wrote:
>
>>80% accuracy when you do it at runtime. The compiler can know the -exact-
>>probabilities of each branch and take advantage of this. The compiler can know
>>with near-100% certainty where most branches will go. The only variable is
>>input, and every combination of input is assumed to have equal probability.
>
>That's absurd. Dynamic branch prediction is over 90% accurate (over 95% for the
>P4) and static branch prediction is at best 80% accurate, and that's profile
>directed. You tell me which is closer to 100%. The reasons should be obvious if
>you think about it.

You're not getting it. Logic on the processor for static branch prediction is
80% accurate because auxillary information available to the compiler is thrown
out. Consider the following loop:

for(i = 0; i < 1000; i++)
    do_something();

The compiler knows that loop will execute 1,000 times. The processor does not. I
am not sure how this was relevant to OOOE or predication, but the point is made.
The compiler can perfectly predict that loop. Even if the condition were i < x
where x is another variable, the compiler can quite often predict the value of x
and therefore also predict the behavior of the loop. This gets somewhat complex
so most compilers don't try.

I know it can be done because I have written code that does this sort of
analysis at a very basic level. My goal was to detect blocks of code that were
unreachable.

>>>What, exactly, do you think the point of predication is, then? It's to allow
>>>instructions to execute before the condition is determined, in other words, out
>>>of order. (Or at least in order without being dependent.) If you think
>>>predicated instructions are only executed after the condition is determined,
>>>then what is the difference between a "predicated branch" and a normal branch,
>>>besides some extra instructions?
>>Predication avoids small conditional branches such as the infamous abs, max, and
>>min functions.
>
>Sure, you can avoid having an actual branch instruction. I'm asking you to think
>deeper. How does that make the processor go any faster?

No branch mispredict = no penalty. Not always possible, but it works well for
short functions such as abs, min, and max. If it were not so, cmov would be a
near useless instruction.

>>>And every other SPEC program shows that "in practice" McKinley is clearly slower
>>>than a P4.
>>So there are two results, and you prefer to throw away one rather than
>>attempting an explanation.
>
>No, more like 12 results and in only one case does the Itanium 2 outperform the
>P4. And I think I've done a very good job explaining why Crafty runs faster on
>the I2 than the P4.
>
>-Tom

The speed of gcc and perl are rather irrelevant to Chess, aren't they?

-Matt



This page took 0.01 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.