Speedup by bitboards
Posted: 13 Jul 2007, 02:25
Excuse me for introducing a statement from the Strelka discussion here.
Vas stated:
Has anybody implented the same search code with bitboard and mailbox? Maybe somebody who switched in his engine from mailbox to bitboard? How large is the speedup with bitboards? This question is of interest independent of the clone debate.
Some time ago I did some comparison on the move generation only. (As I don't have the Fruit search algorithms over my bitboard move generator like the Strelka author claims to have.)
Normal pseudo-legal move generation is almost exactly the same speed in my bitboard code and in Fruit (not so surprising in my opinion). Tactical pseudo-legal move generation is only about 20% faster in my bitboard code. Is this normal or is something wrong with my bitboard implementation?
Checking pseudo-legal moves for legality is really expensive in Fruit, takes about 3x as much time as in my code (for move generation and legality checking together). However, Fruit works around this problem by delayed legality checking.
Evaluation of things like piece activity can also be done faster with bitboards. On the other hand we have more cache trashing in a bitboard engine. So what will be the overall result? Of course the answer depends on the search algorithms that are used. Nevertheless it would be nice to hear a number.
Vas stated:
a) 'Osipov' claims that he changed the Fruit board representation from mailbox to bitboard and got a 2x speedup in performance. This is simply a clueless comment, there would be no speedup of anywhere near this magnitude.
Has anybody implented the same search code with bitboard and mailbox? Maybe somebody who switched in his engine from mailbox to bitboard? How large is the speedup with bitboards? This question is of interest independent of the clone debate.
Some time ago I did some comparison on the move generation only. (As I don't have the Fruit search algorithms over my bitboard move generator like the Strelka author claims to have.)
Normal pseudo-legal move generation is almost exactly the same speed in my bitboard code and in Fruit (not so surprising in my opinion). Tactical pseudo-legal move generation is only about 20% faster in my bitboard code. Is this normal or is something wrong with my bitboard implementation?
Checking pseudo-legal moves for legality is really expensive in Fruit, takes about 3x as much time as in my code (for move generation and legality checking together). However, Fruit works around this problem by delayed legality checking.
Evaluation of things like piece activity can also be done faster with bitboards. On the other hand we have more cache trashing in a bitboard engine. So what will be the overall result? Of course the answer depends on the search algorithms that are used. Nevertheless it would be nice to hear a number.