-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
changelog:changedChange existing functionality (SemVer:MAJOR)Change existing functionality (SemVer:MAJOR)scope:repoGitHub repository and/or ActionsGitHub repository and/or Actionstype:perfA code change that improves performanceA code change that improves performance
Description
Not all System.Linq.Enumerable extension methods on IEnumerable<out T> have a more specific extension method overload for ImmutableArray<T>, which causes a boxing allocation.
E.g. Enumerable.GroupBy Method
Use a specific ImmutableArray<T> extension method overload to avoid boxing allocations.
This also (partially) applies to Roslyn struct-based collections, like Microsoft.CodeAnalysis.SyntaxTokenList and Microsoft.CodeAnalysis.SyntaxList<TNode>.
E.g.
foreach (AttributeSyntax attribute in node.AttributeLists.SelectMany(static attributeList => attributeList.Attributes))Metadata
Metadata
Assignees
Labels
changelog:changedChange existing functionality (SemVer:MAJOR)Change existing functionality (SemVer:MAJOR)scope:repoGitHub repository and/or ActionsGitHub repository and/or Actionstype:perfA code change that improves performanceA code change that improves performance