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 some quadratic name lookup behavior #3579

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

nikswamy
Copy link
Collaborator

@LukeXuan reported that in files with a large number of top-level definitions, typechecking becomes quadratic.

One reason for this is because (surprisingly) we were resolving top-level names in a list (env.gamma_sig) even though we also have a hash map for lookups. Removing this linear scan eliminates one source of the quadratic behavior. I just removed the lookup in gamma_sig.

I also fixed a couple of quadratic list concatenations in SMTEncoding.Encode, though as @mtzguido pointed out, switching systematically to catenable lists will be better.

@nikswamy nikswamy enabled auto-merge October 17, 2024 00:56
@nikswamy nikswamy merged commit 03d5d59 into master Oct 17, 2024
25 checks passed
@nikswamy nikswamy deleted the nik_gamma_sig_no_mtime branch October 17, 2024 00:57
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