diff options
| author | Scott Gasch <[email protected]> | 2026-10-07 08:17:51 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-07 08:17:51 -0700 |
| commit | d14dbe2a50c220b2adac758c3d4f1a1fa67ece0b (patch) | |
| tree | cbf6d9928bcc41ef833b62b70479113f7d419925 /src/data.c | |
| parent | 447130db3df87b40d080dc26429d45e9213c19f7 (diff) | |
Speed up eval/move-gen/SEE; remove EvalLookForDanger, overhaul _EvalKing
SPRT-confirmed improvement (1814 games, st 4.0): candidate nps=1498118
vs head=1378448, avg depth 14.30 vs 13.87, ELO=+24.2+/-16.0,
LOWER95=0.5118, LLR=+3.126 crossing the H1 bound.
Most of the diff is non-semantic speed work across eval.c, generate.c,
movesup.c, see.c, probe.c and friends. Two real semantic changes:
removed EvalLookForDanger and overhauled _EvalKing's king-safety scoring.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -40,6 +40,7 @@ MOVE HASHMOVE = {0x11118888}; MOVE RECOGNMOVE = {0x22228888}; MOVE DRAWMOVE = {0x33338888}; MOVE MATEMOVE = {0x44448888}; +MOVE EGTBMOVE = {0x55558888}; // Is a square white? FLAG g_fIsWhiteSquare[128]; @@ -1056,7 +1057,7 @@ _MagicFindAndBuildForSquare(COOR c, BITBOARD mask, const int iDelta[4], BITBOARD *pMagic, ULONG *pShift, BITBOARD **ppTable) { - ULONG uBits = CountBits(mask); + ULONG uBits = FastCountBits(mask); ULONG uSize = 1UL << uBits; ULONG uShift = 64 - uBits; BITBOARD *rgbbOccupancy = malloc(sizeof(BITBOARD) * uSize); @@ -1089,7 +1090,7 @@ _MagicFindAndBuildForSquare(COOR c, BITBOARD mask, const int iDelta[4], // when multiplied against the mask rarely yields a // collision-free hash -- a cheap filter to skip obviously bad // candidates before paying for the full uSize-entry pass. - if (CountBits((UINT64)(mask * uMagic) & 0xFF00000000000000ULL) < 6) + if (FastCountBits((UINT64)(mask * uMagic) & 0xFF00000000000000ULL) < 6) { continue; } |
