increase starting size of ast's hash table to 512k entries#5040
Merged
NikolajBjorner merged 1 commit intoZ3Prover:masterfrom Mar 2, 2021
nunoplopes:master
Merged
increase starting size of ast's hash table to 512k entries#5040NikolajBjorner merged 1 commit intoZ3Prover:masterfrom nunoplopes:master
NikolajBjorner merged 1 commit intoZ3Prover:masterfrom
nunoplopes:master
Conversation
Collaborator
Author
Contributor
|
wow, I had no idea this could even be a problem |
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 24, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 3, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 3, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 3, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 4, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 4, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 4, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 6, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 6, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 22, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 22, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 22, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 22, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 22, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 23, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 23, 2022
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 24, 2023
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 25, 2023
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 25, 2023
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Sep 25, 2023
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 27, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 27, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 27, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 28, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 29, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 30, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 30, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 30, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 30, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jun 30, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 1, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 2, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 2, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 2, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 2, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 2, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 3, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 3, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 3, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 3, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 4, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 4, 2024
ptr1120
added a commit
to ptr1120/z3-patched
that referenced
this pull request
Jul 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Z3's AST hash table is quite slow and has a lot of collisions. Instead of increasing the hash table, Z3 keeps pouring entries into long chains for collision'ed keys.
Increasing the initial size of this hash table helps a lot for larger formulas.
Here's the dramatic before and after when running just vcgen for a few Alive2 benchmarks:
sqlite3 goes from 5.5 hours to < 1 hour! 😁
The number of collisions is still in
O(crazy). There are other uses ofchashtablethat need investigation.Another thing is that on expansion, collision lists get flipped, which is then terrible for deletion as expressions are deleted in LIFO order. So flipping the collisions lists triggers a quadratic factor in the number of the lists' sizes.
I've a patch that avoids flipping, but that needs further testing.