Skip to content

[6.0][Runtime] Add pointer-based lookup of prespecialized metadata. #73721

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

Merged

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented May 17, 2024

Cherry-pick #73650 to release/6.0.

The existing lookup uses a hash table with the type's mangled name as the key. Building that key is costly. Add a new table that uses pointer keys, so that we can use the descriptor and arguments directly as the key.

rdar://127621414

The existing lookup uses a hash table with the type's mangled name as the key. Building that key is costly. Add a new table that uses pointer keys, so that we can use the descriptor and arguments directly as the key.

rdar://127621414
(cherry picked from commit 96555ba)
@mikeash mikeash requested a review from a team as a code owner May 17, 2024 20:26
@mikeash
Copy link
Contributor Author

mikeash commented May 17, 2024

Explanation: This addresses a performance issue with constructing the key string used to look up prespecialized metadata. The new approach uses a pointer-based hash table that can directly use the generic arguments as the key..
Original PR: #73650
Reviewed by: @al45tair
Risk: Low. This picks up the same data in a new way. If the new way isn't available, it falls back to the old way.
Resolves: rdar://127621414
Tests: We did manual testing to ensure that it works, and regular testing will call this code a great deal.

@mikeash
Copy link
Contributor Author

mikeash commented May 17, 2024

@swift-ci please test

@mikeash mikeash enabled auto-merge May 17, 2024 20:45
@mikeash mikeash merged commit a5ca148 into swiftlang:release/6.0 May 18, 2024
5 checks passed
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.

2 participants