-
Notifications
You must be signed in to change notification settings - Fork 29
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
Precompilation? #186
Comments
I don't know, some precompilation statements probably wouldn't hurt anyway, but it looks already decently fast to me:
This despite the fact FITS files have the problem that deserialising from disk is intrinsically type-unstable |
With diff --git a/src/FITSIO.jl b/src/FITSIO.jl
index ac38c23..05a947c 100644
--- a/src/FITSIO.jl
+++ b/src/FITSIO.jl
@@ -253,4 +253,14 @@ include("header.jl") # FITSHeader methods
include("image.jl") # ImageHDU methods
include("table.jl") # TableHDU & ASCIITableHDU methods
+mktempdir() do dir
+ fname = joinpath(dir, "file.fits")
+ for data in (zeros(Float64, 2), zeros(Float64, 2, 2), zeros(Float32, 2), zeros(Float32, 2, 2))
+ FITS(fname, "w") do f
+ write(f, data)
+ end
+ read(FITS(fname, "r")[1])
+ end
+end
+
end # module I get with Julia v1.8
and with v1.9:
But I feel like the current 0.2 s for first @mileslucas anything else we may want to precompile? |
3D cubes are not uncommon, we could add an extra entry for Float32 and 64 with |
I agree this doesn't seem like a terribly important package for precompilation. Fine to close this if you prefer. |
Not a big deal, but I thought it worth reporting that at least one person has likely used this package as an indication of julia's overall performance, and may have been misled by compilation time: see the first comment at https://www.youtube.com/watch?v=x4oi0IKf52w&lc=UgzzQ_aNhgxC30YXVYx4AaABAg. The latency is pretty short but it could be worth considering precompilation?
The text was updated successfully, but these errors were encountered: