Python Interpreters Benchmarks
x64 ArchLinux : Intel® i5-7200U®

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
 reverse-complement ?±
 regex-dna1/5?±
 spectral-norm1/2 1/2
 k-nucleotide±?±
 pystone± ±
 pidigits± ±
 binary-trees±1/5±
 chameneos-redux± ±
 iobench± ±
 fibonacci ±
 fasta ±
 meteor-contest ±
 thread-ring?±
 jsonbench ±
 fannkuch-redux ±
 fib50 ±
 richards ±
 n-body10× ±
 Python 2 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)  ±10×

± 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
 reverse-complement 
Python 20.01?431  
PyPy0.080.08?431  0% 0% 0% 100%
 regex-dna 
Python 20.040.04?501  0% 0% 75% 0%
PyPy0.150.17?501  6% 6% 6% 88%
 spectral-norm 
Python 20.090.10?394  0% 100% 0% 0%
PyPy0.190.221,036594  95% 5% 0% 0%
 k-nucleotide 
Python 20.090.09?593  100% 11% 0% 0%
PyPy0.110.13?593  0% 85% 0% 0%
 pystone 
Python 20.230.266042301  4% 4% 0% 96%
PyPy0.140.352122301  22% 30% 22% 29%
 pidigits 
Python 23.043.187,368322  100% 2% 2% 1%
PyPy3.093.1285,980322  6% 2% 99% 2%
 binary-trees 
Python 23.751.0416,568743  91% 90% 90% 96%
PyPy1.740.8289,292743  47% 75% 48% 46%
 chameneos-redux 
Python 2287.09114.886,9401192  62% 61% 61% 60%
PyPy175.4785.6774,1721192  51% 47% 44% 45%
 iobench 
Python 249.0549.096,652370  6% 1% 2% 100%
PyPy36.1036.1784,900370  7% 2% 100% 1%
 fibonacci 
Python 20.670.677,268181  7% 100% 6% 2%
PyPy0.260.281,040181  7% 7% 4% 93%
 fasta 
Python 26.466.4713,176900  6% 2% 100% 2%
PyPy2.512.5478,516900  7% 3% 99% 1%
 meteor-contest 
Python 22.672.677,0041485  6% 2% 100% 1%
PyPy0.930.9482,6761579  10% 5% 2% 100%
 thread-ring 
Python 20.550.586,964407  100% 3% 0% 0%
PyPy0.140.17?407  88% 0% 0% 6%
 jsonbench 
Python 24.454.6016,312322  72% 30% 2% 2%
PyPy1.151.1782,316322  7% 8% 93% 0%
 fannkuch-redux 
Python 216.774.4411,6481009  99% 97% 94% 96%
PyPy3.091.0981,3481009  94% 66% 72% 69%
 fib50 
Python 22.792.7938,248130  6% 3% 100% 1%
PyPy0.650.6678,240130  6% 3% 4% 98%
 richards 
Python 21.131.136,9322423  6% 100% 0% 1%
PyPy0.230.251,0402423  8% 92% 4% 4%
 n-body 
Python 247.5847.637,0081337  6% 1% 1% 100%
PyPy4.904.9673,5561337  7% 1% 99% 1%
 templates 
No program
PyPy2.892.9596,712307  10% 4% 94% 1%
 fasta-redux 
No program
PyPy0.240.261,0401115  11% 71% 0% 27%
 mandelbrot
   No programs
 binary-trees-redux
   No programs

 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