Repository navigation
ChessCore 0.6.0 — cross-platform performance pass
ChessCore 0.6.0 — cross-platform performance pass
A benchmark-driven optimization of the hot paths, every change validated
on BOTH Apple (macOS) and non-Apple (arm64 Linux via Docker, the stand-in
for the Skip/Android target) with the new ChessCoreBench harness. Perft
node counts are the move-generation correctness oracle; the full 105-test
suite passes and all parsing/export output is byte-identical.
Verified wins (Linux / Apple, best-of-5):
positionKey/repetitionKey ~2.6x faster (A4 direct-field build + B1 node cache)
loadPGN -12%..-14% Linux (B2 one legal-move list/ply; C4/C6 stdlib;
B7 lazy MoveNode.id UUID — getrandom skip)
PGN export -51% Linux (C5 hoist DateFormatter to a static)
UCI parseInfo -6% Linux (C3 keep split tokens as [Substring])
perft +5% Linux / +7% Apple (A1 filter pseudo->legal in one buffer)
Measured and REJECTED (kept only proven wins):
C1 struct-of-arrays magic tables -> ~6% perft REGRESSION on Linux, reverted
B5 pack Square Int->Int8 -> platform-split wash (Linux +2-4%, Apple -2%), reverted
Tooling: ChessCoreBench (release-only, invisible to library/Skip consumers)
and an opt-in PerfGuard test gate. Also folds in the org migration
(jaredbrewer -> fianchettochess) and gated CI from earlier in the cycle.
Established principle: Foundation-in-hot-paths removal, allocation removal,
and lazy import-path work are safe cross-platform wins; move-gen/memory
LAYOUT changes are coin-flips and must be measured or skipped.