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

Make internal FrozenHashTable non-generic #81603

Merged
merged 1 commit into from Feb 4, 2023

Conversation

stephentoub
Copy link
Member

With some tweaks to how it's defined, we can avoid making it generic at all, which helps to reduce native aot compilation size when ToFrozenDictionary/Set is used with multiple generic instantiations. For code that uses ToFrozenDictionary+TryGetValue+enumeration, this reduces the native aot size by ~10K per generic instantiation.

With some tweaks to how it's defined, we can avoid making it generic at all, which helps to reduce native aot compilation size when ToFrozenDictionary/Set is used with multiple generic instantiations.
@ghost
Copy link

ghost commented Feb 3, 2023

Tagging subscribers to this area: @dotnet/area-system-collections
See info in area-owners.md if you want to be subscribed.

Issue Details

With some tweaks to how it's defined, we can avoid making it generic at all, which helps to reduce native aot compilation size when ToFrozenDictionary/Set is used with multiple generic instantiations. For code that uses ToFrozenDictionary+TryGetValue+enumeration, this reduces the native aot size by ~10K per generic instantiation.

Author: stephentoub
Assignees: stephentoub
Labels:

area-System.Collections

Milestone: -

Copy link
Member

@geeknoid geeknoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@stephentoub stephentoub merged commit 112c758 into dotnet:main Feb 4, 2023
@stephentoub stephentoub deleted the reducefrozensize branch February 4, 2023 03:18
@dotnet dotnet locked as resolved and limited conversation to collaborators Mar 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants