Skip to content

Conversation

@stephentoub
Copy link
Member

Description

We can just pass this as the argument and let the compiler cache the delegate for the non-capturing lambda, rather than allocating a new delegate for the instance method on each access.

Customer Impact

Less allocation, less GC, less GC pause time / overhead.

Regression

No

Testing

Just CI

Risk

Minimal. It's just changing how the delegates are created.

…roxy properties

We can just pass `this` as the argument and let the compiler cache the delegate for the non-capturing lambda, rather than allocating a new delegate for the instance method on each access.
@stephentoub stephentoub requested a review from a team as a code owner June 23, 2021 15:03
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jun 23, 2021
@ghost ghost requested review from SamBent, fabiant3 and ryalanms June 23, 2021 15:03
@ryalanms ryalanms merged commit e3cca0e into dotnet:main Aug 17, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants