Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧠 Use ArrayPool to reduce recurrent allocations #983

Merged
merged 8 commits into from
Sep 13, 2024

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Sep 10, 2024

Test after Game._moveStack still looking neutral
image

Before array pools:
before_arraypools

After array pools:
arraypools

Test  | perf/arraypool-all-test-only-vs-sb-pool-base
Elo   | 1.64 +- 3.78 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 2.89 (-2.25, 2.89) [-5.00, 0.00]
Games | 13948: +3959 -3893 =6096
Penta | [348, 1575, 3064, 1637, 350]
https://openbench.lynx-chess.com/test/712/

eduherminio and others added 3 commits September 11, 2024 02:59
…ncyBitBoards (BitBoard[3]) from ArrayPool and make sure to return them when a Position is not longer used
@eduherminio eduherminio changed the title [WIP] Use ArrayPool to reduce recurrent allocations 🧠 Use ArrayPool to reduce recurrent allocations Sep 12, 2024
@eduherminio eduherminio marked this pull request as ready for review September 12, 2024 21:27
@eduherminio
Copy link
Member Author

TODO: remove logger.Warn, reevaluate disposals (not quite happening, check vm logs?)

@eduherminio eduherminio enabled auto-merge (squash) September 13, 2024 09:16
@eduherminio eduherminio merged commit 7e8e977 into main Sep 13, 2024
27 checks passed
@eduherminio eduherminio deleted the perf/arraypool-all branch September 13, 2024 09:20
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