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
 pidigits1/33 ±
 regex-dna †1/3?±
 templates1/2 ±
 reverse-complement1/2?±
 mandelbrot1/2 ±
 spectral-norm±?1/2
 chameneos-redux± ±
 k-nucleotide±?±
 binary-trees1/6±
 iobench † ±
 fasta ±
 fibonacci ±
 meteor-contest ±
 jsonbench ±
 pystone?±
 fib50 ±
 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/331/33±

† 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.010.01?380  0% 0% 0% 100%
PyPy0.390.401,484380  100% 0% 3% 0%
 regex-dna 
Python 20.030.03?501  100% 0% 0% 0% †
PyPy0.080.08?501  13% 13% 22% 100% †
 templates 
Python 21.051.0516,332307  0% 0% 0% 100%
PyPy2.562.5691,436307  0% 44% 0% 56%
 reverse-complement 
Python 20.010.01?455  0% 100% 0% 0%
PyPy0.020.02?455  0% 0% 100% 0%
 mandelbrot 
Python 274.8719.17173,5243832  97% 98% 99% 97%
PyPy131.8433.79126,0483832  97% 99% 99% 96%
 spectral-norm 
Python 20.070.07?394  0% 0% 86% 0%
PyPy0.080.09?594  89% 0% 0% 0%
 chameneos-redux 
Python 2113.1162.6911,0761192  34% 30% 32% 33%
PyPy102.2954.9466,2241192  31% 34% 32% 33%
 k-nucleotide 
Python 20.080.08?593  0% 11% 100% 0%
PyPy0.050.05?593  0% 100% 0% 17%
 binary-trees 
Python 23.771.1454,152743  82% 81% 82% 90%
PyPy1.880.69313,720743  69% 64% 81% 63%
 iobench 
Python 225.2125.216,804370  0% 79% 0% 21% †
PyPy13.1213.1273,932370  99% 58% 1% 43% †
 fasta 
Python 26.466.4613,432900  0% 75% 0% 25%
PyPy2.292.2974,796900  0% 0% 0% 100%
 fibonacci 
Python 20.660.677,128181  0% 0% 0% 100%
PyPy0.220.221,504181  0% 0% 100% 0%
 meteor-contest 
Python 22.652.656,8681485  0% 84% 0% 16%
PyPy0.780.7875,1881485  0% 0% 100% 1%
 jsonbench 
Python 24.364.3716,424322  0% 0% 100% 0%
PyPy1.201.2076,884322  0% 1% 0% 100%
 pystone 
Python 20.230.238442301  0% 100% 4% 4%
PyPy0.050.05?2301  0% 0% 100% 0%
 fib50 
Python 22.842.8438,432136  0% 0% 100% 0%
PyPy0.600.6072,160136  0% 2% 0% 100%
 fannkuch-redux 
Python 215.914.1342,7081009  95% 97% 96% 98%
PyPy2.690.77262,7641009  92% 86% 83% 87%
 thread-ring 
Python 20.550.557,072407  2% 100% 0% 2%
PyPy0.090.09?407  0% 0% 100% 0%
 richards 
Python 21.171.177,1322423  1% 1% 100% 0%
PyPy0.170.18?2423  0% 0% 100% 0%
 n-body 
Python 250.8250.826,7561337  100% 0% 0% 0%
PyPy6.776.7764,8081337  0% 0% 100% 0%
 fasta-redux 
No program
PyPy0.200.20?1115  15% 0% 84% 0%
 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