Remove unused HashSet allocations in HashJavaNames#11124
Remove unused HashSet allocations in HashJavaNames#11124jonathanpeppers merged 1 commit intomainfrom
Conversation
The hashes32 and hashes64 HashSet<T> instances were populated but never read, resulting in unnecessary allocations during type map generation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR improves type map generation performance by removing unused per-call HashSet<T> allocations in TypeMappingReleaseNativeAssemblyGenerator.HashJavaNames, where the sets were populated but never read.
Changes:
- Remove unused
HashSet<uint>andHashSet<ulong>allocations fromHashJavaNames. - Keep generating/storing both 32-bit and 64-bit Java name hashes on each
TypeMapJavaentry.
|
This change shouldn't affect anything, there are a couple flaky CI failures we can ignore:
|
The
hashes32andhashes64HashSet<T>instances inTypeMappingReleaseNativeAssemblyGenerator.HashJavaNameswere populated every iteration but never read from -- pure wasted allocations during type map generation.This was found while analyzing a binlog for
GenerateTypeMappingstask performance.