I noticed that the first time I run a function with julia, the execution time (as well as the allocated memory) is significantly higher than subsequent executions, at least in my code.
Since I have to run my code on a cluster remotely (i.e. the code in julia starts and runs only once) is there any trick to avoid making execution faster from the start?
The longer time is due to precompilation. If your code uses packages that need precompilation maybe a custom sys image might help. Of course that needs to be compiled too so only worth it if you have similar workloads multiple times.