diff options
| author | Scott Gasch <[email protected]> | 2026-08-30 12:48:34 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-08-30 12:48:34 -0700 |
| commit | 3eac7f469add78edb9dd7dced36bde5427346321 (patch) | |
| tree | 7b32f67728ee7973aa046df18423c6f6efbbd7a0 /src/evalhash.c | |
| parent | 0eb79a56c9174397050535bbfdc3f1e767ba9ffc (diff) | |
Replace bishop/knight/rook/queen mobility jump tables with inline switch dispatch.
The per-square mobility ray-walk called through a function pointer for
every square visited (piece type varies square to square, so the CPU's
indirect-branch predictor couldn't learn it), and nearly every handler
reduced to a couple of constant increments and a stop/continue flag.
Replaced each PMOBILITY_HELPER table with a small case-tag table and an
inlined switch, dropping all now-dead handler functions and the
PMOBILITY_HELPER typedef. Also hoisted the ray-invariant rank/file
direction test (rook's "connected" bonus, queen's bishop/rook xray
cases) out of the per-square switch to compute once per ray instead.
Verified semantics-preserving: node counts, solve/fail sets, and PVs
are byte-for-byte identical to head_reference across all three curated
ECM suites (ringers/confident_quick/hard_quick) at sd 10. bench shows a
consistent ~6-7% NPS improvement over two back-to-back runs.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012Q8wbZABsyG7PZQUd9WBAw
Diffstat (limited to 'src/evalhash.c')
0 files changed, 0 insertions, 0 deletions
