stan-dev / pystan

PyStan, a Python interface to Stan, a platform for statistical modeling. Documentation: https://pystan.readthedocs.io
ISC License
342 stars 59 forks source link

fix: Use newer pysimdjson #374

Closed riddell-stan closed 2 years ago

riddell-stan commented 2 years ago

pysimdjson's major version changes with simdjson's major version. Changes in simdjson's major version seem to be happening frequently due to very minor backwards-incompatible changes.

riddell-stan commented 2 years ago

Looks like there are some breaking changes that need to be fixed.

This seems like a priority because we want to use pysimdjson binary wheels -- and only recent versions are being packaged for a broad range of Python versions, I think.

riddell-stan commented 2 years ago

pysimdjson 5 is a bit faster on my machine at least. Here's an informal test using a version of 8 schools that makes many, many draws:

pysimdjson-3.2.0
  Time (mean ± σ):     14.721 s ±  0.111 s    [User: 18.865 s, System: 2.572 s]
  Range (min … max):   14.529 s … 14.869 s    10 runs

pysimdjson-5
  Time (mean ± σ):     12.869 s ±  0.147 s    [User: 17.006 s, System: 2.606 s]
  Range (min … max):   12.670 s … 13.068 s    10 runs
riddell-stan commented 2 years ago

The diff makes it look like a bigger change than it is. Really only two del msg are being added, as required by the newer version of pysimdjson.