[pypy-dev] pypy + cProfile

Stanislav Bohm stanislav.bohm at vsb.cz
Mon May 11 20:02:50 CEST 2015


Hi

I have observed that Pypy is faster when cProfile is enabled than its 
normal execution.
I would like to ask if it is a normal behavior or a kind of anomaly?

E.g. one of my benchmarks:

Pypy: ~24.5s
Pypy + cProfile: ~19s
CPython: ~22s

Tested with 2.5.1+dfsg-1~ppa1+ubuntu14.04, but I have observed a similar 
behavior with older versions of Pypy shipped with Ubuntu 14.10 and 
15.04. My application is a pure python application that communicates 
through sockets. (It is a state-space analytical tool that communicates 
with a modified Valgrind process through TCP/IP connection).

A replication of results:

Build: https://github.com/spirali/aislinn (Installation instructions: 
http://verif.cs.vsb.cz/aislinn/doc/userguide.html#_installation)

cd aislinn/tests/complex/workers
../../../bin/mpicc workers.c # build an analyzed program
time pypy ../../../src/aislinn/aislinn.py -p4 ./a.out 10 90
time pypy -m cProfile ../../../src/aislinn/aislinn.py -p4 ./a.out 10 90
time python ../../../src/aislinn/aislinn.py -p4 ./a.out 10 90

Best regards,
Stanislav Bohm




More information about the pypy-dev mailing list