Skip to content
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

[mono] Optimize mono_metadata_type_dup_with_cmods #100849

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

kg
Copy link
Member

@kg kg commented Apr 10, 2024

During startup we spend a measurable amount of time duplicating types, and this function in particular is kind of wasteful to the extent that the redundant memset and memcpy operations show up in profiles. I rearranged things a bit so it should touch most bytes of the result only once or twice instead of the 3+ times it currently does. 0.71% -> 0.57%

@kg kg merged commit b8803cb into dotnet:main Apr 10, 2024
75 of 79 checks passed
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
mono_metadata_type_dup_with_cmods is a minor hotspot during WASM startup, so apply some minor optimizations to it
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2024
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.

2 participants