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

refactor: lake: use StateRefT for BuildStore #6290

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tydeu
Copy link
Member

@tydeu tydeu commented Dec 2, 2024

This PR uses StateRefT instead of StateT to equip the Lake build monad with a build store.

As a IO reference, different threads may now contend with the build store. The benchmark results indicate the change has a significant performance impact. On the thread-safety front, the lack of a mutex should not be a concern because the build store is a memorization data structure and thus inconsistent state is theoretically okay.

@tydeu tydeu added the changelog-lake Lake label Dec 2, 2024
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Dec 2, 2024
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries CI can not be attempted yet, as the nightly-testing-2024-11-30 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Batteries CI should run now. (2024-12-02 19:14:25)

@tydeu
Copy link
Member Author

tydeu commented Dec 2, 2024

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 79d8c56.
There were no significant changes against commit 27df5e9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-lake Lake toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants