Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: a question about speed

Author: Matt Taylor

Date: 18:32:36 01/03/03

Go up one level in this thread


On January 03, 2003 at 15:09:57, Vincent Diepeveen wrote:

>On January 03, 2003 at 14:42:19, Dieter Buerssner wrote:
>
>>On January 03, 2003 at 13:21:40, Robert Hyatt wrote:
>>
>>
>>>Why not something like this:
>>>
>>>rank=to>>3;  (now we know the rank and only care if it is zero or seven, and
>>>it can't be zero for white or seven for black so side to move is not important).
>>>
>>>So, you end up with one line:
>>>
>>>
>>>if (to>>3==0 || to>>3==7) gen_promote();
>
>At his beloved P4 the >> instruction is very very very very slow.

4-6 cycles latency, not throughput.

Irrelevant anyway since the compiler doesn't need to do a shift here.

-Matt



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.