Skip to content
This repository was archived by the owner on Dec 27, 2025. It is now read-only.
This repository was archived by the owner on Dec 27, 2025. It is now read-only.

Pre-Compute Non-Pawn Move Masks #54

Description

@Bonifatius94

Issue:

  • computing king / knight / sliding piece masks may be expensive
  • it can be pre-computed and stored in an array, improving the overall draw-gen performance

Suggested Solution:

  • run pre-computation when loading the module, caching common move masks in arrays
  • for king / knight moves: replace the computation by a simple lookup
  • for sliding piece moves: combine a lookup with some bit hacks like hyperbola quintessence to determine blocking pieces

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions