Skip to content

Optimize native code size of Dictionary methods #7858

@jkotas

Description

@jkotas

From dotnet/coreclr#10203 (comment)

I have glanced over the native code generated for Dictionary<int,int>.Remove. The CSE for entry[i] kicks in some cases, but not others. If you cache ref Entry entry = ref entries[i]; at the start of the loop and replace all 9 occurrences of entries[i] with it, the native code generated for this method should be approximately 20% smaller.

Metadata

Metadata

Assignees

Labels

help wanted[up-for-grabs] Good issue for external contributorstenet-performancePerformance related issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions