vs

 1 : Are the Python 2 programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Python 2 program used compared to the fastest PyPy program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the Python 2 programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Python 2 program used compared to the fastest PyPy program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Python 2 used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits †1/37 ±
 regex-dna1/2 ±
 spectral-norm1/2?1/2
 templates †1/2 ±
 k-nucleotide±?±
 chameneos-redux± ±
 binary-trees±±±
 fibonacci ±
 pystone?±
 iobench † ±
 fasta ±
 meteor-contest ±
 jsonbench ±
 thread-ring?±
 fib50 ±
 fannkuch-redux ±
 richards † ±
 n-body †10× ±
 Python 2 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/371/37±10×

† possible mismatch - one-core program compared to multi-core program.

± read the measurements and then read the program source code.

 3 : Are the Python 2 programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest Python 2 program are shown for comparison against measurements of the fastest PyPy program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Python 20.020.02?378  0% 33% 100% 0% †
PyPy0.860.8687,824378  9% 99% 0% 1% †
 regex-dna 
Python 20.090.14?612  8% 8% 31% 23%
PyPy0.370.341,576612  12% 15% 12% 76%
 spectral-norm 
Python 20.080.08?394  0% 0% 100% 0%
PyPy0.180.18?594  5% 100% 0% 0%
 templates 
Python 21.611.6216,812307  89% 11% 17% 5% †
PyPy3.483.4891,356307  2% 100% 1% 1% †
 k-nucleotide 
Python 20.120.12?593  100% 17% 0% 0%
PyPy0.150.15?593  100% 0% 0% 0%
 chameneos-redux 
Python 2166.7992.188,4121192  35% 30% 48% 50%
PyPy137.5476.2577,0601192  39% 40% 37% 37%
 binary-trees 
Python 25.991.6459,252743  91% 98% 91% 92%
PyPy3.061.3286,804743  58% 54% 67% 72%
 fibonacci 
Python 20.780.796,716181  9% 100% 3% 4%
PyPy0.380.381,608181  3% 0% 97% 3%
 pystone 
Python 20.360.361,4562301  3% 6% 100% 10%
PyPy0.140.14?2301  100% 0% 0% 0%
 iobench 
Python 244.5144.526,372370  14% 72% 99% 36% †
PyPy16.6616.6683,964370  80% 1% 21% 1% †
 fasta 
Python 210.1110.1112,696900  2% 100% 2% 4%
PyPy3.193.1978,120900  0% 100% 0% 0%
 meteor-contest 
Python 23.773.776,6001485  100% 5% 0% 3%
PyPy1.101.1082,0961485  0% 100% 0% 2%
 jsonbench 
Python 26.986.9815,396322  2% 3% 1% 100%
PyPy1.781.7879,076322  100% 0% 1% 1%
 thread-ring 
Python 20.770.776,432407  4% 0% 4% 100%
PyPy0.190.19?407  0% 0% 100% 5%
 fib50 
Python 24.044.0537,928136  3% 4% 2% 100%
PyPy0.940.9477,652136  1% 1% 0% 100%
 fannkuch-redux 
Python 228.307.3544,4681009  98% 97% 97% 97%
PyPy4.201.3479,3841009  75% 91% 72% 77%
 richards 
Python 21.971.976,3242423  16% 43% 100% 34% †
PyPy0.300.301,5722423  100% 0% 3% 0% †
 n-body 
Python 275.5275.536,7121337  8% 11% 8% 94% †
PyPy7.947.9573,7961337  0% 0% 100% 1% †
 fasta-redux 
No program
PyPy0.360.361,6041115  3% 0% 28% 72%
 mandelbrot 
Python 2101.2628.56166,3123832  99% 96% 97% 99%
No program
 reverse-complement
   No programs
 binary-trees-redux
   No programs

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Python 2 programs for these benchmarks?

Remember - those are just the fastest Python 2 and PyPy programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Python 2.

Maybe one of those other Python 2 programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Python 2 and PyPy programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 Python 2 : the old Python 

 

Revised BSD license

  Home   Conclusions   License   Play