Skip to content

Try using unordered_map hash in DacInstanceManager#123737

Open
hoyosjs wants to merge 4 commits intodotnet:mainfrom
hoyosjs:juhoyosa/dacinstance_hash
Open

Try using unordered_map hash in DacInstanceManager#123737
hoyosjs wants to merge 4 commits intodotnet:mainfrom
hoyosjs:juhoyosa/dacinstance_hash

Conversation

@hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented Jan 28, 2026

No description provided.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copilot AI review requested due to automatic review settings February 27, 2026 04:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR switches DacInstanceManager’s instance lookup structure to the std::unordered_map-based implementation by default, and updates the custom hashing hook to avoid reliance on non-portable hash_compare.

Changes:

  • Disable the hand-rolled DAC hashtable by default (DAC_HASHTABLE) so the unordered_map path is used.
  • Replace std::hash_compare-based hashing with a portable unary hash functor for std::unordered_map.
  • Minor cleanup in daccess.cpp (reference declaration simplification; remove unused local).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/coreclr/debug/daccess/dacimpl.h Switches default to unordered_map and replaces the hasher implementation with a portable functor.
src/coreclr/debug/daccess/daccess.cpp Small cleanups in the unordered_map codepath (reference syntax; remove unused variable).

@hoyosjs
Copy link
Member Author

hoyosjs commented Mar 10, 2026

/backport to release/8.0

@github-actions
Copy link
Contributor

Started backporting to release/8.0 (link to workflow run)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Significant decrease in performance of mini dump creation between targeting .NET Framework 4.6.1 and .NET 8

3 participants