-
-
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
Compilation time regression when extending a Base method. #20780
Comments
I'm guessing that's the #265 tax. |
I don't see how this is relevant to #265? I am just adding a new method. What is different about this than extending any other method? In my view, nothing needs to be recompiled. |
It's clear whether it's #265 or not but the point of the fix is that you only pay for it at method definition time (including figuring out what should trigger the recompilation during type inference) and not the runtime. It at least does spend most of the time in type inference. |
I still think adding +1 second to a package load time (that's not even removed with precompilation) for a one line function that only extends a base method for a new type is unacceptable. |
Oh, this is a bit confusing, since the time cost is in
I don't see any reason that |
It exactly the same timings when I had it in my package that did not use |
This would be nicer if we had function types, but this tries to at least hit a couple of the high points fix #20780
This would be nicer if we had function types, but this tries to at least hit a couple of the high points fix #20780
This would be nicer if we had function types, but this tries to at least hit a couple of the high points fix #20780
This would be nicer if we had function types, but this tries to at least hit a couple of the high points fix #20780
One of my packages (https://github.com/KristofferC/Crayons.jl) went from 0.02 seconds load time after precompilation to ~ 1 seconds from 0.5 to 0.6. I was able to reduce it to the following:
On 0.5:
On 0.6:
Removing that method, load time of package goes from 0.02s to 0.04s from 0.5 to 0.6.
The text was updated successfully, but these errors were encountered: