Replace reflection with code generation #89530
Replies: 2 comments 1 reply
-
Code generation (available via the Code generators feature) happens at compile time. It will not be available at runtime. You may not need reflection, as in many cases wiring things together can be performed at runtime, assuming you've gathered the required info at compile time. |
Beta Was this translation helpful? Give feedback.
-
This is what reflection emit provides. Frameworks care about performance are already using it for a long history. However, generating code is definitely more expensive than only using it once. |
Beta Was this translation helpful? Give feedback.
-
We can replace reflection actual behaviors with codegeneration?
To generate codes at runtime and improve performance in many scenarios
And help for native aot implementations
Beta Was this translation helpful? Give feedback.
All reactions