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

Feature/red black trees #466

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft

Feature/red black trees #466

wants to merge 17 commits into from

Conversation

remexre
Copy link
Member

@remexre remexre commented Feb 2, 2021

Changes

Adds sets, maps, and multimaps implemented directly in Silver.
This lets them share structure, which should reduce peak memory use and GC pressure.

This is on top of feature/docgen, so waiting on it to be merged first.

Documentation

  • A comment on the implementation points to a better explanation than I can write of the deletion algorithm
  • The basic RBT operations are as in Okasaki (I suppose I could put a page number etc there too)
  • Doc comments are yet to be written, will do that before making this no-longer-a-draft
  • I still need to implement join and split; I'll comment those once they're written

Testing

  • Property tests would be worth doing?

Performance

  • I'll start using these in Silver and do actual performance comparisons before this is merged.
  • The case where I think this is an obvious win is synthesized attributes that are sets, which are currently (often) represented as linked lists.
  • Eric and I briefly discussed having a more generic environment library; in principle, I'd assume that one could do one that saved a bunch of work with laziness.

TODOs

  • join, split (for faster set operations)
  • Write doc comments
  • Use these in Silver
  • Compare performance to treeset

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.

2 participants