Skip to content

Pre-compile to de Bruijn indices.#2271

Draft
smimram wants to merge 6 commits intomainfrom
de-bruijn
Draft

Pre-compile to de Bruijn indices.#2271
smimram wants to merge 6 commits intomainfrom
de-bruijn

Conversation

@smimram
Copy link
Member

@smimram smimram commented Mar 3, 2022

Get rid of sources of inefficiencies during evaluation.

  • Use de Bruijn indices (integers) instead of variable names (which require string comparisons). In the current implementation this is somewhat counterbalanced by the fact that we restrict closures to the part which is really used (= free variables), but this operation is itself costly (we are filtering the whole environment).
  • We constantly compute positions for values whereas we should not need that anymore apart from specific cases (e.g. for reporting encoder errors), which can be handled specifically. Internal errors are not supposed to happen...
  • In many cases, we can pre-compute the order of application of arguments (especially since we dropped partial application), thus avoiding comparing labels.

@smimram
Copy link
Member Author

smimram commented May 17, 2022

Before I forget: things are quite complicated by the presence of labeled and optional arguments... I am not really sure how to get rid of those.

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