Skip to content

chore: minor improvements and correction - #402

Merged
ptsouchlos merged 8 commits into
mainfrom
chore/minor-improvements
Jul 12, 2026
Merged

chore: minor improvements and correction#402
ptsouchlos merged 8 commits into
mainfrom
chore/minor-improvements

Conversation

@ptsouchlos

Copy link
Copy Markdown
Owner

This hopefully improves performance in some cases with the following changes:

  • Remove board.clone() calls in for NMP and razoring
  • Reduce the overhead of timeout checks for hard limits based on the number of nodes.
  • Cache check and pin metadata per node search.
  • Avoid double SEE checks in qsearch

One "correctness" fix, which may have been a bug previously, is that we don't let aborted search results get stored in the TT or other tables and don't propagate the result.

bench: 1064381

This removes calls to `board.clone()` in razoring and nmp and instead use make/unmake like usual since the `Board` can also support unmaking null moves.

bench: 1064381
Check hard timeout every 2048 nodes since there's an overhead with checking time.

bench: 1064381
Don't recompute check and pinned piece metadata more than once if we don't have to. This changes how this info is passed to the move picker and where it's first computed during search.

bench: 1064381
In some cases, we don't need to check see again. If a capture is yielded after the TT stage we don't check see again since it would be redundant.

bench: 1064381
bench: 1064381
This will validate the pre-condition for skipping the extra see check in debug mode.

bench: 1064381
Don't put aborted search results in tables or store moves as "best" if the search for that iteration was aborted or stopped early otherwise.

bench: 1064381
@ptsouchlos

Copy link
Copy Markdown
Owner Author

STC regression

Elo   | 1.37 +- 3.53 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | 2.96 (-2.94, 2.94) [-5.00, 0.00]
Games | N: 15438 W: 4322 L: 4261 D: 6855
Penta | [343, 1796, 3387, 1843, 350]

https://openbench.nocturn9x.space/test/7393/

@ptsouchlos
ptsouchlos merged commit 1ea4a7c into main Jul 12, 2026
29 checks passed
@ptsouchlos
ptsouchlos deleted the chore/minor-improvements branch July 12, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant