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

Fast path for overload attribute matching #6670

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ehsantn
Copy link
Collaborator

@ehsantn ehsantn commented Jan 28, 2021

Attribute typing tries all the templates for a data type, since a generic function of any template may match an attribute.
However, overload_method/overload_attribute only match a single attribute and have _attr stored, so there is no need for testing all templates. Some complex types have hundreds of attributes so this can matter sometimes. This PR provides a fast path for overloads, which would accelerate the common cases. Some benchmarking shows compilation time difference (not massive but significant).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants