Performance

Optimization Techniques

  • Magic bitboards: O(1) sliding piece attack generation using pre-computed magic numbers

  • Incremental hash updates: Zobrist hash is updated incrementally during make/unmake move

  • Copy-make: Board state is copied before making moves for efficient unmake

  • Inline functions: Critical functions are marked static inline for compiler optimization

  • Bit manipulation intrinsics: Uses efficient bit counting and LSB detection

Memory Usage

Component

Size

Bishop attack table

32 KB

Rook attack table

256 KB

Transposition table

Configurable

Repetition table

8 KB

Memory usage of major components