🎯 Goal
Remove std::optional feature from the codebase in legal move generation (hot path) to optimize a bit the engine.
🧠 Key Idea / Logic
std::optional is a recent c++ feature, allowing to make a variable optional.
However, its presence in hot paths slows the engine down.
🛠️ Tasks
- Benchmark the engine before the update
- Create new enum vales representing defaults (invalid state):
Piece::NO_PIECE, Color::NO_COLOR
- Remove occurences of std::optional
- Benchmark the engine after the update
✅ Acceptance Criteria
- Full test suite is passing
- Engine must be slightly faster
📝 Notes
No response
🎯 Goal
Remove
std::optionalfeature from the codebase in legal move generation (hot path) to optimize a bit the engine.🧠 Key Idea / Logic
std::optionalis a recent c++ feature, allowing to make a variable optional.However, its presence in hot paths slows the engine down.
🛠️ Tasks
Piece::NO_PIECE,Color::NO_COLOR✅ Acceptance Criteria
📝 Notes
No response