Skip to content

Improve sharing under binders - #787

Draft
eb8680 wants to merge 2 commits into
masterfrom
eb-sharing-under-binder
Draft

eb8680 wants to merge 2 commits into
masterfrom
eb-sharing-under-binder

Conversation

@eb8680

@eb8680 eb8680 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

This PR contains a few performance fixes all aimed at preserving sharing under binders/renaming. On master, it is possible to construct Terms that evaluate in quadratic or even exponential time even with the new caching machinery #745. With these fixes, a much larger class of Terms with binders can be analyzed or transformed in linear time, e.g. test_evaluate_dag_under_binders_no_exponential_blowup.

I'm pretty sure what's here is correct but I'm not sure it's minimal. I may break this into separate PRs once I work out remaining kinks.

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.

1 participant