Author: Sune Fischer
Date: 03:34:01 06/28/02
Go up one level in this thread
On June 28, 2002 at 03:29:51, Gian-Carlo Pascutto wrote: >On June 27, 2002 at 17:29:51, Robert Hyatt wrote: > >>>If bitboards came without this penalty, you would be able to use them >>>whenever you can make the operation you're doing faster in bitboards. >>>I'd be a no-brainer to use them. However, this is not the case, and >>>you need to 'bet' that you will be able to recover the penalty you >>>incur because of this make/unmake updates, in other parts of the >>>program. >> >>Note that 64 bit machines reduce the penalty by 50%. 128 bit machines >>will reduce it by 75% since two bitboards can be updated in one operation. > >I don't believe the speedup is that good at all (harder to parallelize >for the cpu, memory limiting), but that is arguable. > >>>For the given eval example, this is not true. It can be used regardless >>>of what is used in the rest of the program. >> >>For some of the examples given, yes. Checking for "is it passed" is not >>as simple without bitmaps... Or "is it isolated" or "is it backward" or >>questions like "how many open files around the king" and the like. Anytime >>a question has several 'sub-questions' (status of a group of squares) then >>bitmaps offer the possibility of asking all those sub-questions with a single >>boolean operation, which is interesting... > >I think I disagree again. These are all very simple and very fast in my >non-bitboard program as well. (2 compares + 1 branch for the first two, >3 compares for the second one) Of course, one needs to get into the >non-bitboard line of thinking first before being able to make it that >fast :) It seems to be me, that 0x88 suffers from a lot of branches and bitboards from a lot of memory loads. I think the idea of having 1 bit per square is great, where as looping and asking a lot of questions just to answer one simple question doesn't appeal to me as much. To answer the question which is faster, I think we need to ask on which hardware; are we talking super chips with massive amounts of cache or tiny slow palmpilots, do they have hardware BFS and popcount, what is the branch misprediction penalty, are we programming for the present or the (near) future, etc...? Personally I see both methods as having advantages and disadvanteges, so what it comes down to is a matter of taste, IMHO. -S. >What bitboards are good for is stuff like 'how many pieces are within >2 squares of my king'. I can do this very fast without bitboards as >well, but bitboards allow me to do it anywhere in the evaluation, >which isn't possible in the classical approach (in my program). > >-- >GCP
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.