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

fix: speed up variable extractions #32

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

sorawee
Copy link

@sorawee sorawee commented Sep 7, 2023

Prior this commit, the variables are repeatedly appended at the back of a list, causing quadratic running time. Since ordering doesn't matter, this commit makes it appends to the front instead.

Note that the algorithm overall is still potentially quadratic. A proper fix needs to changes the interface significantly to introduce an additional accumulator. This commit simply makes a minimal fix for the immediate issue that we are having,
which causes CompConstant to get stuck.

Prior this commit, the variables are repeatedly appended at the back of
a list, causing quadratic running time. Since ordering doesn't matter,
this commit makes it appends to the front instead.

Note that the algorithm overall is still potentially quadratic.
A proper fix needs to changes the interface significantly to introduce
an additional accumulator. This commit simply makes a minimal fix for
the immediate issue that we are having,
which causes CompConstant to get stuck.
@@ -286,12 +241,7 @@
; define internal function
Copy link
Collaborator

Choose a reason for hiding this comment

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

These comments feel useless to me. Let's instead describe the purpose of the internal function or just remove the comment entirely.

@shankarapailoor shankarapailoor merged commit f696a05 into Veridise:main Sep 7, 2023
@sorawee sorawee deleted the unstuck-compconstant branch September 7, 2023 23:46
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.

2 participants