It looks like collection expressions make unnecessary copies of structures which could be big. #75143
Labels
Area-Compilers
Bug
Code Gen Quality
Room for improvement in the quality of the compiler's generated code
New Feature - Collection Expressions
Milestone
Observed:
Compiler copies parameter of
Test
into a local and then uses that local for the purpose of populating resulting array.It feels like the copy is not necessary and the parameter can be used directly.
IL for
Test
method:The text was updated successfully, but these errors were encountered: