Add precompilation hints. Do they help or not?

Tue, 19 Nov 2019 09:35:42 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Tue, 19 Nov 2019 09:35:42 -0500
changeset 5
29b38780d52b
parent 4
5c0f579a5d0f
child 6
cd3ca6286daa

Add precompilation hints. Do they help or not?

src/Gradient.jl file | annotate | diff | comparison | revisions
src/Translate.jl file | annotate | diff | comparison | revisions
--- a/src/Gradient.jl	Mon Nov 18 18:21:00 2019 -0500
+++ b/src/Gradient.jl	Tue Nov 19 09:35:42 2019 -0500
@@ -201,4 +201,23 @@
     return u
 end
 
+#####################################################
+# Precompilation hints to speed up compilation time
+# for projects depending on this package (hopefully).
+######################################################
+
+precompile(∇₂!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,2}))
+precompile(∇₂!, (Array{Float64,3}, Array{Float64,2}))
+precompile(∇₂ᵀ!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,2}))
+precompile(∇₂ᵀ!, (Array{Float64,2}, Array{Float64,3}))
+precompile(∇₂c!, (Array{Float64,3}, Array{Float64,2}))
+precompile(∇₃!, (Array{Float64,3}, Array{Float64,3}, Array{Float64,3},Array{Float64,3}))
+precompile(∇₃ᵀ!, (Array{Float64,3}, Array{Float64,3}, Array{Float64,3},Array{Float64,3}))
+precompile(vec∇₃!, (Array{Float64,4}, Array{Float64,4}, Array{Float64,4},Array{Float64,4}))
+precompile(vec∇₃ᵀ!, (Array{Float64,4}, Array{Float64,4}, Array{Float64,4},Array{Float64,4}))
+
+# The folding functions cannot be precompiled as theyre' meant to be (hopefully)
+# inlined in such a way that the parameter function also gets inlined withou our
+# code
+
 end # Module
--- a/src/Translate.jl	Mon Nov 18 18:21:00 2019 -0500
+++ b/src/Translate.jl	Tue Nov 19 09:35:42 2019 -0500
@@ -145,4 +145,13 @@
     end
 end
 
+#####################################################
+# Precompilation hints to speed up compilation time
+# for projects depending on this package (hopefully).
+######################################################
+
+precompile(translate_image!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,1}))
+precompile(translate_image!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,3}))
+precompile(extract_subimage!, (Array{Float64,2}, Array{Float64,2}, Array{Float64,1}))
+
 end

mercurial