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

Use fast hashing functions with IndexMap and IndexSet everywhere. #2495

Merged
merged 5 commits into from
Sep 22, 2023

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented Sep 20, 2023

Various spots in WGSL are using plain IndexMap and IndexSet from the indexmap crate, rather than a variant that uses the same faster hash function as the rest of Naga. Change these sites to all use the faster hash function.

@jimblandy jimblandy requested a review from teoxoy September 20, 2023 22:45
@jimblandy jimblandy changed the title Use fash hashing functions with IndexMap and IndexSet everywhere. Use fast hashing functions with IndexMap and IndexSet everywhere. Sep 20, 2023
Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

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

LGTM from a code perspective, but I have a question that I think needs to be answered before merging: where are the benchmarks? How can I be sure this is actually making things faster?

@jimblandy
Copy link
Member Author

My intent here is not actually speed, but consistency. We have FastHashMap and FastHashSet, so it's odd to randomly use other hash functions depending on who wrote the code.

@jimblandy
Copy link
Member Author

LGTM from a code perspective, but I have a question that I think needs to be answered before merging: where are the benchmarks? How can I be sure this is actually making things faster?

This is a good point. Filed #2499 (and naturally #2498).

@jimblandy jimblandy merged commit 1b1ea37 into gfx-rs:master Sep 22, 2023
5 checks passed
@jimblandy jimblandy deleted the use-fast-index-map-set branch September 22, 2023 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants