When C++ functions are passed, these need to be compiled the first time. Therefore there is an initial time cost, after which MCMC runs much faster. microbenchmark comparison currently seems to be recompiling, therefore making it seem like C++ is only ~4 times faster, when in fact more like 30 times faster.
Maybe store MCMC run-time within output, so can be extracted? Then maybe load microbenchmark results rather than re-calculate, to speed up vignette build?
When C++ functions are passed, these need to be compiled the first time. Therefore there is an initial time cost, after which MCMC runs much faster. microbenchmark comparison currently seems to be recompiling, therefore making it seem like C++ is only ~4 times faster, when in fact more like 30 times faster. Maybe store MCMC run-time within output, so can be extracted? Then maybe load microbenchmark results rather than re-calculate, to speed up vignette build?