-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Do not generate Equals/GetHashCode support for async state machines #83369
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
Conversation
Saves 0.63% on BasicMinimalApi. This logic controls whether we inject the `__GetFieldHelper` override for the type (see dotnet/corert#5436).
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsSaves 0.63% on BasicMinimalApi. This logic controls whether we inject the Context: #83323 Cc @dotnet/ilc-contrib
|
...coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs
Outdated
Show resolved
Hide resolved
|
Are these more things that can be stripped from async state machines? I assume that we block reflection for them already. |
No, they're eligible for reflection... except for CoreLib and the other System.Private libraries. We don't block private reflection anywhere else right now. One thing we could do is try to make their MethodTable smaller. Currently we need to set several bits in optional fields and rare flags... that are not so rare because there's many of these. The interface implementations also go to the sealed vtable. Not sure if there's big advantages to that. |
Looked more into it. Making these reflection blocked would save 0.04%. We'd also not get much saving from making the MethodTables smaller. There's only 250 state machines in BasicMinimalApi so saving ~20 bytes per each of these wouldn't be meaningful. These GetFieldHelper methods are often 200-300 bytes of overhead so the savings are more pronounced. |
Saves 0.63% on BasicMinimalApi.
This logic controls whether we inject the
__GetFieldHelperoverride for the type (see dotnet/corert#5436). Suggestions for better ways of detecting async state machines are welcome!Context: #83323
Cc @dotnet/ilc-contrib