roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS1231 can cause perf implications and should probably be avoided in most scenarios when the struct is small

Open prezaei opened this issue 6 months ago • 5 comments

I wouldn't enable this rule, at least not unless all the readonly structs are massive. It seems like the intent is to avoid costs associated with copying of structs, but passing by reference then means that all accesses are indirections, which has its own costs.

prezaei avatar Aug 11 '24 17:08 prezaei