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

Add more specialized frozen collection types. #79794

Merged
merged 2 commits into from
Jan 9, 2023
Merged

Commits on Jan 3, 2023

  1. Add 7 more specialized frozen collection types.

    - Add SmallFrozenDictionary/Set which don't do any hashing and simply iterate through arrays,
    testing each element
    
    - Add ClosedRangeInt32FrozenDictionary/Set which are used when the keys are in a
    closed integer range.
    
    - Add SparseRangeInt32FrozenSet which uses a bit vector for storage.
    
    FrozenDictionary/Set each have some constants defined to drive the heuristics that
    decide when to use the small and sparse collection types. I did some preliminary tuning
    of these, but this could use a detailed benchmark to pick the right values. I'll leave
    the fine-tuning to a separate PR.
    Martin Taillefer committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    a8cfa79 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2023

  1. Expand supported numeric sets on .NET 7+

    Martin Taillefer committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    4276798 View commit details
    Browse the repository at this point in the history