[mono] Switch generic instance cache back to GHashTable; improve ginst hash function#113287
Merged
kg merged 2 commits intodotnet:mainfrom Apr 7, 2025
Merged
[mono] Switch generic instance cache back to GHashTable; improve ginst hash function#113287kg merged 2 commits intodotnet:mainfrom
kg merged 2 commits intodotnet:mainfrom
Conversation
Member
Author
3 tasks
Member
|
Total AOT compilation of the dedup assembly (build time) on macOS-arm64 host of MAUI template app in debug config:
There are improvements in #113274 as well. |
Member
Author
|
/backport to release/9.0-staging |
Contributor
|
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/13763019043 |
4 tasks
steveisok
pushed a commit
that referenced
this pull request
Mar 10, 2025
…ashTable; improve ginst hash function (#113316) Backport of #113287 This change will revert to the hashtable container used for the generic instance cache in .NET 8.0 to address a performance regression introduced by changing to a different container in 9. Also improves the hash function used for the cache (the existing one was suboptimal.) Co-authored-by: Katelyn Gadd <[email protected]>
kotlarmilos
approved these changes
Mar 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reverts the generic instance cache to use GHashTable and replaces the hash function for generic instances with a more robust hash function. The latter is mostly important for simdhash, but it should improve performance for GHashTable too.
This may address the increase in AOT compile times.