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

Make BuilderSpirv::has_capability and has_extension O(1) #633

Closed
khyperia opened this issue May 26, 2021 · 0 comments · Fixed by #688
Closed

Make BuilderSpirv::has_capability and has_extension O(1) #633

khyperia opened this issue May 26, 2021 · 0 comments · Fixed by #688
Labels
t: enhancement A new feature or improvement to an existing one.

Comments

@khyperia
Copy link
Contributor

From #630:

We should cache the extensions/capabilities into a hashset or something instead of doing a linear search every time (and string cmp on top of that). There's probably a lot of other inefficiencies like this littered around the codebase, too, but yeah.

(Also we should really look into removing/bypassing rspirv's type deduplication code, it's wasting quite a bit of work double-deduplicating stuff after our deduplication - and their deduplication is a linear scan through all types_global_values, unlike our hash lookup)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: enhancement A new feature or improvement to an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant