All samplers run for 1024 iterations.
X <- bench::mark(
"Metropolis-Hastings" = {samplr::sampler_mh(1, "norm", c(0,1), sigma_prop=1)},
"MC3" = {samplr::sampler_mc3(1, "norm", c(0,1), sigma_prop=1)},
"Hamiltonian Monte-Carlo" = {samplr::sampler_hmc(1, "norm", c(0,1))},
"REC" = {samplr::sampler_rec(1, "norm", c(0,1))},
"MCHMC" = {samplr::sampler_mchmc(1, "norm", c(0,1), )},
"MCREC" = {samplr::sampler_mcrec(1, "norm", c(0,1))},
check = FALSE, iterations = 50
)
#> Warning: Some expressions had a GC in every iteration; so filtering is
#> disabled.
knitr::kable(as.data.frame(X[,c("expression", "min", "median")]))| expression | min | median |
|---|---|---|
| Metropolis-Hastings | 1.43ms | 1.51ms |
| MC3 | 13.32ms | 13.81ms |
| Hamiltonian Monte-Carlo | 10.6ms | 10.94ms |
| REC | 10.82ms | 11.22ms |
| MCHMC | 75.06ms | 81.77ms |
| MCREC | 75.01ms | 84.38ms |