Uh oh!
There was an error while loading. Please reload this page.
Add public MethodInvoker and ConstructorInvoker classes - #88415
Conversation
commented
Jul 5, 2023
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
commented
Jul 5, 2023
Tagging subscribers to this area: @dotnet/area-system-reflection Issue Details[wip]
|
a7581d0 to
3a7296eCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f72e73b to
a3428edCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| RuntimeType sigType = _argTypes[i]; | ||
| // Convert the type if necessary. | ||
| // Note that Type.Missing is not supported. |
There was a problem hiding this comment.
NIT: By assuming this applyes to all new Invoke methods, this might be good to be added to the public doc
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
commented
Jul 20, 2023
Improvement in dotnet/perf-autofiling-issues#19968. |
Fixes#85539
Adds fixed-parameter-count and Span-based Invoke APIs for performance, primarily achieved by preventing the
object[]allocation for when there are <= 4 parameters. Also, additional, faster, emit-based functions are generated for methods that don't haveref\outparameters and meet other constraints. These are also used by the existing Invoke methods so performance there has increased as well.Todo
Benchmarks
Benchmarks for the new APIs. ~2.4- 3.3x faster for the 4 parameter case with no allocs. Also, these improvements would be greater but they are compared to the existing Invoke API which was also made faster here.
Benchmarks for existing Invoke APIs. Up to 1.4x faster for a property setter. Fewer allocs when >=5 parameters.
Benchmarks for NativeAot. ~1.3-1.7x faster when using the new APIs