Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

I ran crossgen2 compiling a Release CoreLib under a profiler and this stood out quite a bit. The JIT-based CoreLib doesn't have the Array<T> type so GetType was walking all types in CoreLib.

image

I split this logic out to an ILC-specific file. I don't remember this showing up in the profiles for ILC, but I added a cache nevertheless.

I ran crossgen2 compiling a Release CoreLib under a profiler and this stood out quite a bit. The JIT-based CoreLib doesn't have the `Array<T>` type so `GetType` was walking all types in CoreLib.

I split this logic out to an ILC-specific file. I don't remember this showing up in the profiles for ILC, but I added a cache nevertheless.
@MichalStrehovsky
Copy link
Member Author

@dotnet/crossgen-contrib could someone have a look please?

@MichalStrehovsky MichalStrehovsky merged commit 58663f7 into dotnet:main Dec 31, 2021
@MichalStrehovsky MichalStrehovsky deleted the closestDefType branch December 31, 2021 21:21
@ghost ghost locked as resolved and limited conversation to collaborators Jan 31, 2022
@EgorBo
Copy link
Member

EgorBo commented Sep 8, 2022

@MichalStrehovsky btw, more like by 40% 😄
image

@MichalStrehovsky
Copy link
Member Author

@MichalStrehovsky btw, more like by 40% 😄

Nice! I didn't bother to measure. I was guessing 10% based on the profile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants