-
Notifications
You must be signed in to change notification settings - Fork 3
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
Invalidations from constructor of Int64 #11
Comments
Interesting. That constructor is very useful, however, as it is the most obvious way to make a number non-static. It would be possible to use a syntax like A MWE to reproduce the problem is:
which yields a list of over 2000 invalidated methods. Maybe the best solution would be to not make Related: I am planning to move the integers out of StaticNumbers, into a StaticIntegers package. That should also reduce compile time. |
OK, so it seems Julia has a bunch of methods that are compiled for But I want to be able to call those methods with a static input, so Not sure how to solve this. |
I won't suggest any solution here since I'm not working on static numbers myself, but maybe you will be able to figure something out 🙂 . |
There has been drastic improvement on the julia master branch recently. The above example that generated 2219 invalidations on 1.6.0-DEV.923 two weeks ago yields only 321 invalidations today on 1.6.0-DEV.1106. Unique invalidations dropped from 625 to 39. The solution here seems to be to simply wait for Julia 1.6 to be released. Huge thanks to everyone on the julia team that has been working on this. |
In issue JuliaArrays/ArrayInterface.jl#61 (comment) there is some discussion about using StaticNumbers in other packages and one issue that was raised are increased compiled times. SnoopCompile let me quickly nail it down to overloading the constructor of
Int64
fromStatic
. Just removing it has a huge effect on load times:That's on a freshly
dev
ed StaticNumbers and after removing just that one method.I don't know how critical that constructor is to functionality of
StaticNumbers.jl
.The text was updated successfully, but these errors were encountered: