From 44cb792c76167a5b3bde4f71fc7c4874a6807f0e Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 23 Sep 2009 17:11:29 +0100 Subject: [PATCH] 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 --- src/position.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/position.h b/src/position.h index a051ec38..4f6f2d53 100644 --- a/src/position.h +++ b/src/position.h @@ -298,12 +298,12 @@ private: template 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] -- 2.39.2