Skip to content

Add a Bump interner #64

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add a Bump interner #64

wants to merge 2 commits into from

Conversation

JonasAlaif
Copy link

Adds another interner option (sorry). Rather than holding interned Ts in individual Boxes (like the current Arena interner), this new Bump interner uses bump allocation. This approach is similar to how rustc handles interning.

My initial version is pretty bare-bones compared to the API of the other interners in this crate. I'd be happy to add functions as required.

An interesting thing to note is that one Bump could have multiple interner sets for different types while sharing the same arena for all of them. Unfortunately, I can't think of a way to make this general aside from defining by hand Bump2<T, U>, Bump3<T, U, V>, ...

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