Closed AaronDJohnson closed 2 years ago
The slowdown in scipy.stats.uniform
likely comes from the overhead associated with the underlying rv_continuous
object. This would mean our other priors which use scipy.stats
will have the same overhead and be way slower than expected. Whatever the solution for UniformPrior
is we should do the same for NormalPrior
. LinearExpPrior
already has a homegrown PDF function.
Calling pta.get_lnprior() takes almost as long as pta.get_lnlikelihood(). For a model 2A with 130 parameters, it takes ~ 7 ms to compute the log prior with the current
scipy.stats.uniform
methods and ~9 ms to compute the log likelihood. However, computing these uniform priors via a custom function only takes ~18.4 microseconds.Can we make uniform priors compute faster within
enterprise
? This could save almost half the run time for model 2A, and probably some time in the 3A searches too.