-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Split TryGetGenericMethodComponents
into two overloads
#84156
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
Resolves dotnet#83069. Hello World is now 1.45 MB, down from 1.65 MB. Half of the callers don't care about the `MethodNameAndSignature` part - don't spend time computing it. This also allows trimming `MethodNameAndSignature` from a hello world, which allows trimming pretty much all of the type loader.
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsResolves #83069. Hello World is now 1.45 MB, down from 1.65 MB. Half of the callers don't care about the This also allows trimming
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Hm, we still have the type loader on Linux. At least two reasons:
|
Ah, nope. We could still be in some shared code and the MdArray handle was template-type-loaded. So we might need to template-type-load the SzArray. We'll have to live with this. I'll update the Linux baseline size to not expect the template type loader saving. |
We can teach the JIT to use a different JIT helper for MD arrays that have rank 2 or more. The JIT helper for this case would not have this dependency. |
We can fix this one by calling FastAllocateString directly. We are calling FastAllocateString directly in System.Globalization in number of places, so one more is not a big deal. |
I was afraid you would suggest this :).
Another alternative would be delaying making the delegate targets reflectable: #82607 (comment). But |
MdArray rank1 with all-zero lower bounds gets actually allocated as an SzArray. On Native AOT this means we need to spin up to the type loader to potentially load the new type. Split this expensive (and impossible-to-express-in-C#) thing into a separate helper so we can trim the type loader. dotnet#84156 (comment)
A delegate with a ValueTuple over a reference type triggers generation of type loader data structures to load arbitrary ValueTuples over reference types at runtime. The replacement is a lot less expensive. dotnet#84156 (comment)
A delegate with a ValueTuple over a reference type triggers generation of type loader data structures to load arbitrary ValueTuples over reference types at runtime. The replacement is a lot less expensive. #84156 (comment)
MdArray rank1 with all-zero lower bounds gets actually allocated as an SzArray. On Native AOT this means we need to spin up to the type loader to potentially load the new type. Split this expensive (and impossible-to-express-in-C#) thing into a separate helper so we can trim the type loader. #84156 (comment)
Resolves #83069. Hello World is now 1.45 MB, down from 1.65 MB.
Half of the callers don't care about the
MethodNameAndSignature
part - don't spend time computing it.This also allows trimming
MethodNameAndSignature
from a hello world, which allows trimming pretty much all of the type loader.Cc @dotnet/ilc-contrib