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

† 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% 100% 0% †
PyPy3.003.0385,776322  6% 11% 99% 8% †
 reverse-complement 
Python 20.010.01?431  0% 100% 0% 0% †
PyPy0.090.09?431  100% 11% 13% 0% †
 regex-dna 
Python 20.030.03?501  0% 0% 100% 0%
PyPy0.140.15?501  0% 100% 7% 7%
 k-nucleotide 
Python 20.080.08?593  100% 0% 0% 11% †
PyPy0.210.3630,332593  100% 100% 100% 100% †
 templates 
Python 21.091.0915,876307  4% 4% 2% 100% †
PyPy3.153.2496,596307  17% 50% 13% 66% †
 spectral-norm 
Python 20.080.08?394  0% 13% 0% 89% †
PyPy0.210.211,112594  100% 73% 33% 15% †
 chameneos-redux 
Python 2152.7883.777,1001192  44% 45% 42% 39%
PyPy181.95103.0974,7521192  70% 84% 66% 81%
 iobench 
Python 237.3937.426,992370  2% 100% 2% 3%
PyPy35.6335.7085,356370  6% 9% 3% 100%
 binary-trees 
Python 23.771.1958,912743  91% 82% 83% 88%
PyPy1.810.9789,528743  82% 64% 72% 86%
 pystone 
Python 20.230.248522301  0% 96% 4% 0% †
PyPy0.120.12?2301  8% 8% 17% 100% †
 fibonacci 
Python 20.670.677,240181  1% 100% 3% 0%
PyPy0.260.271,100181  4% 7% 100% 4%
 fasta 
Python 26.646.6513,444900  3% 100% 4% 4% †
PyPy2.542.5779,716900  99% 100% 13% 7% †
 meteor-contest 
Python 22.642.657,1561485  3% 100% 1% 2%
PyPy0.890.9184,1201485  78% 7% 23% 3%
 jsonbench 
Python 24.564.5717,080322  3% 100% 3% 3% †
PyPy1.411.5182,084322  51% 99% 46% 47% †
 fannkuch-redux 
Python 217.084.6543,6201009  97% 96% 98% 97%
PyPy2.951.3682,6841009  77% 80% 98% 85%
 thread-ring 
Python 20.550.557,060407  100% 4% 0% 0%
PyPy0.150.15?407  7% 7% 94% 0%
 richards 
Python 21.111.127,1002423  100% 0% 0% 3% †
PyPy0.280.281,1202423  100% 19% 24% 14% †
 n-body 
Python 253.1753.336,6921337  30% 28% 64% 20%
PyPy5.185.3875,2441337  31% 77% 17% 38%
 fasta-redux 
No program
PyPy0.250.261,1401115  7% 100% 96% 11%
 mandelbrot 
Python 275.6320.23176,5243832  95% 100% 97% 96%
No program
 fib50
   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