Skip to content

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

Merged
kg merged 4 commits into
dotnet:mainfrom
kg:bundled-resources-opt
May 13, 2024
Merged

[wasm] Optimize bundled_resources key creation, hashing, and comparison#101460
kg merged 4 commits into
dotnet:mainfrom
kg:bundled-resources-opt

Conversation

@kg

@kg kg commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

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
@kg kg requested review from lambdageek and thaystg as code owners April 24, 2024 00:10
@ghost ghost added the area-VM-meta-mono label Apr 24, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@kg kg force-pushed the bundled-resources-opt branch from c290ab8 to 3f6a0a6 Compare May 13, 2024 16:02
Comment thread src/mono/mono/metadata/bundled-resources.c Outdated
Comment thread src/mono/mono/metadata/bundled-resources.c Outdated
Comment thread src/mono/mono/metadata/bundled-resources.c
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
Copy Markdown
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.

@lambdageek lambdageek left a comment

Copy link
Copy Markdown
Member

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
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