-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Producing abstract types can be more expensive than leaftypes #13299
Comments
I think it's just about weakening Line 2146 in 042c4d5
this should not need a leaftype, just something that is not a typevar should be ok |
+1 to that |
Thanks for looking into this. I hope fixing this will make trait methods in Traits.jl just as efficient as normal methods. At the moment, they usually produce more native code. |
@JeffBezanson backport this or no? |
Yes should be safe. |
This is not crucial. |
Making a abstract type seems more expensive than a concrete one (although I didn't benchmark it):
Note that
@code_native f() = A
is just as short as forb
.The text was updated successfully, but these errors were encountered: