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/30 ±
 templates †1/2 ±
 regex-dna1/2 ±
 spectral-norm±?1/2
 mandelbrot± ±
 chameneos-redux± ±
 binary-trees±1/5±
 k-nucleotide?±
 iobench ±
 fibonacci ±
 fasta ±
 meteor-contest ±
 jsonbench ±
 fib50 ±
 pystone?±
 fannkuch-redux ±
 thread-ring?±
 richards † ±
 n-body † ±
 Python 2 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/301/30±

† 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.700.7091,592378  1% 100% 7% 1% †
 templates 
Python 21.611.6216,812307  89% 11% 17% 5% †
PyPy3.153.1592,420307  0% 100% 1% 1% †
 regex-dna 
Python 20.090.14?612  8% 8% 31% 23%
PyPy0.220.211,512612  15% 16% 64% 18%
 spectral-norm 
Python 20.080.08?394  0% 0% 100% 0%
PyPy0.110.11?594  100% 0% 0% 0%
 mandelbrot 
Python 2101.2628.56166,3123832  99% 96% 97% 99%
PyPy147.2338.002,027,0843832  99% 98% 98% 97%
 chameneos-redux 
Python 2166.7992.188,4121192  35% 30% 48% 50%
PyPy142.5276.5565,3081192  31% 28% 48% 52%
 binary-trees 
Python 25.991.6459,252743  91% 98% 91% 92%
PyPy2.891.12319,408743  76% 76% 81% 71%
 k-nucleotide 
Python 20.120.12?593  100% 17% 0% 0%
PyPy0.070.07?593  88% 0% 0% 0%
 iobench 
Python 238.8238.836,576370  3% 11% 95% 3%
PyPy16.9116.9275,068370  10% 2% 92% 2%
 fibonacci 
Python 20.780.796,716181  9% 100% 3% 4%
PyPy0.260.271,484181  4% 100% 0% 0%
 fasta 
Python 210.1110.1112,696900  2% 100% 2% 4%
PyPy3.063.0776,404900  5% 1% 100% 1%
 meteor-contest 
Python 23.773.776,6001485  100% 5% 0% 3%
PyPy0.990.9977,6241485  0% 0% 0% 100%
 jsonbench 
Python 26.986.9815,396322  2% 3% 1% 100%
PyPy1.661.6782,048322  100% 0% 1% 1%
 fib50 
Python 24.044.0537,928136  3% 4% 2% 100%
PyPy0.850.8575,956136  88% 1% 12% 2%
 pystone 
Python 20.360.361,4562301  3% 6% 100% 10%
PyPy0.070.07?2301  0% 100% 0% 0%
 fannkuch-redux 
Python 228.107.2546,6161009  97% 98% 99% 99%
PyPy4.181.20256,8241009  88% 88% 93% 87%
 thread-ring 
Python 20.770.776,432407  4% 0% 4% 100%
PyPy0.110.12?407  8% 0% 100% 0%
 richards 
Python 21.971.976,3242423  16% 43% 100% 34% †
PyPy0.230.231,4762423  0% 0% 100% 0% †
 n-body 
Python 275.9976.066,7121337  14% 7% 9% 95% †
PyPy8.028.0266,7601337  1% 3% 100% 1% †
 fasta-redux 
No program
PyPy0.260.271,5121115  100% 0% 0% 4%
 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