Skip to content

feat: lake: builtin facet memoize toggle #7738

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

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

Conversation

tydeu
Copy link
Member

@tydeu tydeu commented Mar 30, 2025

This PR makes memoization of built-in facets toggleable through a memoize option on the facet configuration. Built-in facets which are essentially aliases (e.g., default, o) have had memoization disabled.

@tydeu tydeu added the changelog-lake Lake label Mar 30, 2025
@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 Mar 30, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Mar 30, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 30, 2025
@tydeu
Copy link
Member Author

tydeu commented Mar 30, 2025

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 84667e9.
There were significant changes against commit 12a21e7:

  Benchmark          Metric         Change
  ==================================================
- lake build no-op   instructions     2.9%  (12.1 σ)
+ lake config elab   wall-clock      -3.8% (-11.4 σ)
+ lake env           task-clock      -5.1% (-20.8 σ)
+ lake env           wall-clock      -5.3% (-32.5 σ)
+ liasolver          task-clock      -4.3% (-17.9 σ)
+ liasolver          wall-clock      -4.4% (-14.9 σ)
+ qsort              task-clock      -6.1% (-10.6 σ)
+ qsort              wall-clock      -6.1% (-10.5 σ)
+ rbmap              task-clock      -2.3% (-11.0 σ)
+ rbmap              wall-clock      -2.3% (-10.4 σ)
+ rbmap_fbip         task-clock      -5.3% (-40.1 σ)
+ rbmap_fbip         wall-clock      -5.3% (-47.2 σ)
+ simp_arith1        task-clock      -1.8% (-10.2 σ)

@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Mar 30, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

@tydeu tydeu marked this pull request as ready for review March 31, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR 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