stan-dev / posteriordb

Database with posteriors of interest for Bayesian inference
182 stars 36 forks source link

Updating Stan Models to be more performant #224

Open SteveBronder opened 3 years ago

SteveBronder commented 3 years ago

Looking over the recent paper here I noticed that a number of the models they outperform stan on need updated and are not really made for performance testing. I'll list out a few notes on these as I go

earn_height.stan:

hmm_example:

kidscore_interaction

log10earn_height:

logearn_interaction

vector[N]  log_earn = log(earn);
vector[N]  inter    = height .* male;

logmesquite_logva

mesquite.stan

pretty much all of these can use normal_id_glm

arK

t4c1 commented 3 years ago

@t4c1 should we have a specialized version of normal_id_glm() that works for vector ~ normal_id_glm(vector, real, real , real)?

I doubt this would bring significant speedup over the code in the model. The performance bottleneck is computing the vector related stuff, so the differences in a few scalar operations is negligible.

MansMeg commented 3 years ago

That seems like good improvements. Could you open a PR with these changes?

SteveBronder commented 3 years ago

srry I don't have time I'm just posting this for someone who wants to contribute