-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass large structs by ref for performance #1
Comments
Yes, when a variable is modified by the lambda (flow analysis), the parameter is made https://github.com/antiufo/roslyn-linq-rewrite/blob/master/RoslynLinqRewrite/RoslynLinqRewrite/LinqRewriter.cs#L320 I just checked with your example and it correctly generates a |
heh yeah I guess I was unclear, it should be ref if it changes OR it is a
~9% improvement for passing a |
assuming the readme is correct,
should instead be:
It doesn't really matter in this particular case, but it could in cases where the type of the closure was a larger struct or was modified. For example
should output
q: 5, l: 8
The text was updated successfully, but these errors were encountered: