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

perf: speed up reflection of if in bv_decide #6162

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

hargoniX
Copy link
Contributor

@hargoniX hargoniX commented Nov 21, 2024

This PR adds a slight performance improvement to reflection of if statements that I noticed by profiling Leanwuzla against SMTCOMP's non-incremental/QF_BV/fft/Sz256_6616.smt2.

In particular:

  1. The profile showed about 4 percent of the total run time were spent constructing these decidable instances in reflection of if statements. We can construct them much quicker by hand as they always have the same structure
  2. This delays construction of these statements until we actually generate the reflection proof that we wish to submit to the kernel. Thus if we encounter a SAT instad of an UNSAT problem we will not spend time generating these expressions anymore.
baseline
  Time (mean ± σ):     31.236 s ±  0.258 s
  Range (min … max):   30.899 s … 31.661 s    10 runs

after
  Time (mean ± σ):     30.671 s ±  0.288 s
  Range (min … max):   30.350 s … 31.156 s    10 runs

@hargoniX hargoniX added the changelog-no Do not include this PR in the release changelog label Nov 21, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 21, 2024 19:39 Inactive
@hargoniX hargoniX added this pull request to the merge queue Nov 21, 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 Nov 21, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Nov 21, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 21, 2024
Merged via the queue into master with commit a101377 Nov 21, 2024
21 checks passed
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Nov 21, 2024
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-no Do not include this PR in the release changelog 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.

2 participants