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 (typedef|table|declsec)_locator metadata loading #100157

Merged
merged 7 commits into from
Apr 12, 2024

Conversation

kg
Copy link
Contributor

@kg kg commented Mar 22, 2024

Metadata loading does a bunch of table searches that contain redundant lookups and checks, this PR attempts to optimize them by hoisting most of the checking and computation outside of the binary search operation.

Profile with this in effect: https://share.firefox.dev/4aqtjUc

@kg
Copy link
Contributor Author

kg commented Mar 23, 2024

I don't quite understand the linker error I'm getting on android and tvOS. I assume I need to apply a component API attribute to something, but I'm not sure what or why

Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. just some nits about making shared type sand functions.

src/mono/mono/metadata/metadata-internals.h Outdated Show resolved Hide resolved
src/mono/mono/metadata/metadata-internals.h Outdated Show resolved Hide resolved
src/mono/mono/metadata/metadata-internals.h Outdated Show resolved Hide resolved
@kg kg merged commit be3ad0d into dotnet:main Apr 12, 2024
76 of 79 checks passed
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
…net#100157)

* Optimize typedef_locator, table_locator and declsec_locator by hoisting initialization out
* Cleanup duplicated code with different understandings of locator_t
@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.
Labels
area-VM-meta-mono runtime-mono specific to the Mono runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants