mrc-ide / drjacoby

Flexible Markov chain monte carlo via reparameterization
https://mrc-ide.github.io/drjacoby/
Other
12 stars 6 forks source link

microbenchmark in example vignette producing misleading results #5

Closed bobverity closed 5 years ago

bobverity commented 5 years ago

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?