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

Zippers and pointers. #6

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Zippers and pointers. #6

merged 3 commits into from
Oct 25, 2024

Conversation

BurningWitness
Copy link
Collaborator

Both changes are relevant for parsing:

  • Zippers allow one-pass lookup followed up by an insertion to the same spot without holding the entirety of the key in memory. This solves the degenerate case of having to look up extremely long keys in parsers where the total key set is known beforehand.

  • Compressed pointers are cheaper keys for trees that never change shape. Mostly useful for precompilation, although there may be other uses.

Both handle rather rare side cases, so they're put in modules separate from the main ones. Both may be extended in the future, however I don't want to add unnecessary functionality to them.

Cursors have been removed from all modules since zippers perform roughly the same job.

Additionally:

@BurningWitness BurningWitness mentioned this pull request Oct 9, 2024
1 task
@BurningWitness BurningWitness merged commit 5f80481 into master Oct 25, 2024
7 checks passed
@BurningWitness BurningWitness deleted the pointers branch October 25, 2024 17:24
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