Hi everyone,
I have recently tried with little success to add a precompilation step to my own package project and hope someone can help me clarify a few problems.
In this post
it is explained that one can precompile methods by calling precompile(method, (types...), however making it work in practice seems quite cumbersome. In particular, it is pointed out that the compiler cannot really precompile functions called within method without further steps.
-
If I have a lot of functions is it really the only way to precompile them in a reasonable manner that I specify the argument types of each function individually?
-
If I have a function
exemplaryRun(), which performs a typical workload with typical types, i can call this function within the definition of my module. From what I have seen, this executes the function only at the precompilation step. I would have expected that this would reduce compilation time so that methods only need to be compiled after loading the module if they have different types. Unfortunately, I noticed that somehow this introduces nasty run-time allocations when I use methods from my module, so somehow this approach does not seem to work. Why? -
Is there an easy but relatively effective way to incorporate precompilation? I am aware of PackageCompiler but having to create a new sys-image everytime something is changed in the package is not really worth it as of now.
I hope there are some insightful answers to any of these ![]()