Why is lambda without closures turned into an instance method rather than a static one? #70761
-
While playing with this code:
I've discovered it looks like this one:
plus:
But why is If I replace lambda with
plus:
|
Beta Was this translation helpful? Give feedback.
Answered by
CyrusNajmabadi
Nov 10, 2023
Replies: 1 comment 3 replies
-
Instance method invocation in a delegate is faster. It's a detail of the runtime that we exploit for performance. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
voroninp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instance method invocation in a delegate is faster. It's a detail of the runtime that we exploit for performance.