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

[wasm] Optimize bundled_resources key creation, hashing, and comparison #101460

Merged
merged 4 commits into from
May 13, 2024

Conversation

kg
Copy link
Member

@kg kg commented Apr 24, 2024

In startup profiles we spend a lot of time in bundled_resources_resource_id_equal and ..._id_hash.

@kg kg added the arch-wasm WebAssembly architecture label Apr 24, 2024
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

char *key;
if (dn_simdhash_ptr_ptr_try_get_value (bundled_resource_key_lookup_table, (void *)value->id, (void **)&key)) {
dn_simdhash_ptr_ptr_try_remove (bundled_resource_key_lookup_table, (void *)value->id);
g_free (key);
Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, this is what is cleaning up the key.

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

consider moving g_memrchr to eglib (remember to also update eglib-remap.h)

@kg kg requested a review from steveisok as a code owner May 13, 2024 16:56
@kg kg merged commit 0432b30 into dotnet:main May 13, 2024
79 checks passed
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
…on (dotnet#101460)

Optimize bundled_resources key creation and hashing
Migrate bundled_resources to simdhash
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants