ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

question about symmertic evaluation
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Robert Hyatt



Joined: 27 Feb 2006
Posts: 15816
Location: Birmingham, AL

PostPost subject: Re: question about symmertic evaluation    Posted: Thu May 24, 2007 8:18 pm Reply to topic Reply with quote

hgm wrote:
The latency of divide instructions is such that they almost always cause a hefty pipeline stall. The re-order buffer is simply not large enough to hide the latency, even if it is not on a critical path.

The divide cannot be retired before it has finished, and this means that it will stall the retire stage when all instructions before it in the control stream have been retired. This will create a traffic jam in the re-order buffer, which will fill up with the instructions after the div, that will complete execution, but cannot be retired.

I think nowadays the re-order buffer can hold about 75 uOps, but with an execution throughput of 3 uOps per cycle, it will only take about 25 cycles before all uOps in the re-order buffer have completed execution. The remaining 17 cycles the CPU is then completely stalled.

It is hard to believe that you would not notice this in execution speed. If you don't, it is more likely because the compiler is actually clever enough to eliminate the division, or do it in FP with the aid of a reciprocal. The reciprocal refinement algortithm also has a quite long latency (although faster than 42 clocks), but it has the advantage that it consists of several instructions, and thus completes and retires gradually. A smart compiler can then interleave the critical path of the division with other instructions, and avoid a pipeline stall completely. It even can pipeline several divisions that way, which for the div instructions is impossible.


I actually don't know how (nor do I care) the compiler handles a/b for ints. All I care about is symmetrical answers, which >> won't give directly. Whatever it does the cost inside Crafty is nil. And I am not dividing by a power of 2 either. I have this in a couple of key places:

((s) * (62 - Min(TotalWhitePieces + TotalBlackPieces, 42)) / 86)

which is not exactly a power of 2...
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
question about symmertic evaluation Uri Blass Wed May 23, 2007 7:53 pm
      Re: question about symmertic evaluation Uri Blass Wed May 23, 2007 8:45 pm
      Re: question about symmertic evaluation Gerd Isenberg Wed May 23, 2007 8:46 pm
            Re: question about symmertic evaluation Uri Blass Wed May 23, 2007 9:04 pm
            Re: question about symmertic evaluation Robert Hyatt Wed May 23, 2007 9:51 pm
                  Re: question about symmertic evaluation Uri Blass Wed May 23, 2007 10:04 pm
                  Re: question about symmertic evaluation Gerd Isenberg Wed May 23, 2007 10:09 pm
                        Re: question about symmertic evaluation Robert Hyatt Thu May 24, 2007 12:01 am
                              Re: question about symmertic evaluation Gerd Isenberg Thu May 24, 2007 7:37 am
                                    Re: question about symmertic evaluation H.G.Muller Thu May 24, 2007 8:06 am
                                          Re: question about symmertic evaluation Gerd Isenberg Thu May 24, 2007 9:24 am
                                                Re: question about symmertic evaluation H.G.Muller Thu May 24, 2007 10:39 am
                                                Re: question about symmertic evaluation Gerd Isenberg Thu May 24, 2007 11:36 am
                                                      Re: question about symmertic evaluation H.G.Muller Thu May 24, 2007 11:55 am
                                                Re: question about symmertic evaluation Gerd Isenberg Thu May 24, 2007 7:46 pm
                                          Re: question about symmertic evaluation Robert Hyatt Thu May 24, 2007 8:18 pm
                                                Re: question about symmertic evaluation Gerd Isenberg Thu May 24, 2007 8:55 pm
                                                      Re: question about symmertic evaluation Uri Blass Fri May 25, 2007 10:44 am
                                                            Re: question about symmertic evaluation Gerd Isenberg Fri May 25, 2007 6:28 pm
                                                                  Re: question about symmertic evaluation Uri Blass Fri May 25, 2007 7:42 pm
                                                                        Re: question about symmertic evaluation Gerd Isenberg Fri May 25, 2007 8:00 pm
                                    Re: question about symmertic evaluation Robert Hyatt Thu May 24, 2007 8:13 pm
                                          Re: question about symmertic evaluation Gerd Isenberg Thu May 24, 2007 8:33 pm
                                                Re: question about symmertic evaluation Robert Hyatt Sat May 26, 2007 1:05 am
                                                      Re: question about symmertic evaluation Gerd Isenberg Sat May 26, 2007 7:18 am
                                                            Re: question about symmertic evaluation Robert Hyatt Sat May 26, 2007 5:08 pm
                                                                  Re: question about symmertic evaluation Robert Hyatt Sat May 26, 2007 5:25 pm
                                                                  Re: question about symmertic evaluation Gerd Isenberg Sat May 26, 2007 6:23 pm
                                                                        Re: question about symmertic evaluation Robert Hyatt Sun May 27, 2007 2:48 pm
                  Re: question about symmertic evaluation Steven Edwards Thu May 24, 2007 3:42 am
                        Re: question about symmertic evaluation Robert Hyatt Thu May 24, 2007 8:20 pm
      Re: question about symmertic evaluation Robert Hyatt Wed May 23, 2007 9:50 pm
      Re: question about symmertic evaluation William H. Rogers Fri May 25, 2007 7:48 pm
            Re: question about symmertic evaluation Uri Blass Sat May 26, 2007 11:38 am
                  Re: question about symmertic evaluation H.G.Muller Sat May 26, 2007 2:07 pm
      Re: question about symmertic evaluation Vincent Diepeveen Sat May 26, 2007 7:27 pm
            Re: question about symmertic evaluation Gerd Isenberg Sat May 26, 2007 8:20 pm
            Re: question about symmertic evaluation Uri Blass Sat May 26, 2007 9:29 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads