I have successfully compiled the main parts of my program and runs much faster than before. I do have a question. Consider the following 4 examples, all compiled programs but with different options. Example0 is just plain compile, example1 has what I thought would be the optimal: parallelization and compilationtarget->"C" and declaration of the return types for the external calls, but it takes twice as long!!! Why is that?
If I remove the declaration of the return types it goes a bit faster than plain Compile even though it has parallelization and CompilationTarget-> "C", and if I remove CompilationTarget-> "C" it's about the same.
Any insight? Thanks so much to everyone for their help with Compile, my MCMC simulations will be much faster now.
p.s. My main program is basically multiplying the function in question (exampleN) many many times, that's why I put multiply over the same call.