Speed of evaluating (gradients of) log probabilities in pystan 2.x vs 3

Actually 100K times (10 samples per iteration). One of my grad students has been running these tests. Here is what she gets using ipython:

For pystan version 2.19
%time fit.grad_log_prob(param.tolist())
CPU times: user 136 µs, sys: 29 µs, total: 165 µs
Wall time: 180 µs

For pystan version 3
%time model.grad_log_prob(param.tolist())
CPU times: user 15.7 ms, sys: 2.92 ms, total: 18.6 ms
Wall time: 16.6 ms

2 Likes