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

teika: use mutable substitutions #217

Merged
merged 1 commit into from
Jul 1, 2024
Merged

teika: use mutable substitutions #217

merged 1 commit into from
Jul 1, 2024

Conversation

EduardoRFS
Copy link
Contributor

@EduardoRFS EduardoRFS commented Jul 1, 2024

Goals

Achieve a much faster typer.

Context

Currently Teika uses a model where substitutions are only dropped when the stack unwinds, this makes so that the substitutions are never overwritten while some term may still reference it, making so that storing them on the stack is not needed, additionally this makes using a mutable array as the substitutions list waaay easier.

This PR switches to using a mutable substitution list, but note that the actual substitutions are "imutable" and only the content can change, this is intentional as the reference to the substs should indicate the length of substs. This is not optimal but is really easy to implement.

Related

@EduardoRFS EduardoRFS self-assigned this Jul 1, 2024
@EduardoRFS EduardoRFS merged commit 6a7cf52 into main Jul 1, 2024
@EduardoRFS EduardoRFS deleted the mutable-substs branch July 1, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant