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

Kernel: Optimise conversion #280

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

francoisthire
Copy link
Collaborator

@francoisthire francoisthire commented Jun 16, 2022

Partial answer to #279 .

  1. We add a physical equality for optimisation. We can check this may be triggered by some unit tests
  2. We still keep the syntactic equality. This is to avoid to compute the WHNF while to terms are syntactically equal (see test : tests/OK/sharing.dk).

@francoisthire francoisthire force-pushed the francois@convertibility-optimisation branch from 38a12d4 to f9e6854 Compare June 16, 2022 14:06
@francoisthire francoisthire merged commit a704208 into master Jun 16, 2022
@01mf02
Copy link

01mf02 commented Jun 17, 2022

How about just checking for physical equality as part of term_eq?
This has two advantages:

  1. It would likely accelerate other sites where term_eq is currently called without checking for physical equality, for example in srcheck.ml.
  2. If you have two terms that are not physically equal, but their subterms are, then checking for physical equality in the recursive calls of term_eq would make term_eq faster.

@gabrielhdt gabrielhdt deleted the francois@convertibility-optimisation branch June 18, 2022 13:39
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