<#18969 Evaluate performance of using Pypy to run ...
# github-notifications
c
#18969 Evaluate performance of using Pypy to run Pants Issue created by stuhood I evaluated running Pants under
pypy
but (likely due to the fact that
pyo3
does not have support for using the HPy API, so
pypy
needs to emulate the CPython API), it was a slower than CPython:
Copy code
Benchmark #1: git co main && PY=/Users/stuhood/.pyenv/versions/3.9.12/bin/python3.9 ./pants --no-pantsd dependencies ::
  Time (mean ± σ):     50.203 s ±  0.341 s    [User: 53.337 s, System: 9.651 s]
  Range (min … max):   49.757 s … 50.897 s    10 runs

Benchmark #2: git co stuhood/pypy && PY=/Users/stuhood/.pyenv/versions/pypy3.9-7.3.11/bin/pypy3.9 ./pants --no-pantsd dependencies ::
  Time (mean ± σ):     80.154 s ±  0.727 s    [User: 77.489 s, System: 10.779 s]
  Range (min … max):   78.745 s … 80.993 s    10 runs

Summary
  'git co main && PY=/Users/stuhood/.pyenv/versions/3.9.12/bin/python3.9 ./pants --no-pantsd dependencies ::' ran
    1.60 ± 0.02 times faster than 'git co stuhood/pypy && PY=/Users/stuhood/.pyenv/versions/pypy3.9-7.3.11/bin/pypy3.9 ./pants --no-pantsd dependencies ::'
The changes are tagged here for posterity: https://github.com/stuhood/pants/commits/stuhood/pypy pantsbuild/pants