Is there a performance hit when using user-defined functions?

Hi everyone,

I am just playing with GPs and decided to move the calculation of the Cholesky decomposition into a function. I was wondering whether there is ever a disadvantage of writing a user-defined Stan function in terms of efficiency – is there some data passing back and forth, or is there no disadvantage to using them?

Thanks in advance,

The arguments are passed by reference, so no measureable difference.


Good to know, thanks!