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

Signature optimization #638

Merged
merged 11 commits into from
Jan 8, 2025
Merged

Signature optimization #638

merged 11 commits into from
Jan 8, 2025

Conversation

joe-hauns
Copy link
Contributor

Optimized the signature such that no intermediate strings are created when looking up a symbol. This is espcially important for numerals.
Before this PR, whenever we wanted to find a numeral's function-id we did the following:

  • turn the numeral into a string
  • hash that string
  • look up the symbol id from _funNames
    Now we will directly hash the number, which is way faster. Similar optimizations have been performed for looking up interpreted functions. Further I managed to shrink the codebase a bit as a sideeffect.

Also while i was on it I removed the unused flag overflownConstant as that is not necessary anymore since we're using GMP.

Copy link
Contributor

@MichaelRawson MichaelRawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

Parse/SMTLIB2.cpp Show resolved Hide resolved
Kernel/Theory.cpp Show resolved Hide resolved
Kernel/Signature.hpp Outdated Show resolved Hide resolved
Kernel/Signature.cpp Show resolved Hide resolved
@quickbeam123 quickbeam123 merged commit 1f3a308 into master Jan 8, 2025
1 check passed
@quickbeam123 quickbeam123 deleted the signature-optimization branch January 8, 2025 10:21
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.

3 participants