1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Reorder data layout and optimize access patern

With this very simple patch we get a speed boost
of 0.8% on my PC !

Sometime we find the most complex tricks to increase speed
when instead the best results come from the simplest solutions.

No functional change of course ;-)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-09-23 17:11:29 +01:00
parent e68e135771
commit 44cb792c76

View file

@ -298,12 +298,12 @@ private:
template<GamePhase> Value compute_value() const;
Value compute_non_pawn_material(Color c) const;
// Bitboards
Bitboard byColorBB[2], byTypeBB[8];
// Board
Piece board[64];
// Bitboards
Bitboard byTypeBB[8], byColorBB[2];
// Piece counts
int pieceCount[2][8]; // [color][pieceType]