vs

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

Each chart bar shows, for one unidentified benchmark, how much the fastest Python 3 program used compared to the fastest PyPy 3 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 3 programs faster? Approximately.

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

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

 Python 3 used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits1/83 ±
 regex-dna1/4 ±
 templates1/4 ±
 reverse-complement †1/4?±
 iobench1/2 ±
 spectral-norm †± 1/2
 binary-trees±1/2±
 k-nucleotide±?±
 fasta-redux± ±
 chameneos-redux ±
 fasta † ±
 pystone †?±
 fibonacci ±
 fannkuch-redux ±
 jsonbench ±
 meteor-contest ±
 richards ±
 fib50 ±
 n-body † ±
 thread-ring †149×?±
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/831/83±149×

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

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

 3 : Are the Python 3 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 3 program are shown for comparison against measurements of the fastest PyPy 3 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Python 30.040.05?379  60% 100% 80% 67%
PyPy 33.543.7379,340322  70% 97% 68% 39%
 regex-dna 
Python 30.050.05?524  0% 17% 100% 0%
PyPy 30.220.221,116524  5% 9% 5% 100%
 templates 
Python 31.131.1320,156322  1% 11% 100% 1%
PyPy 34.134.16112,664322  2% 10% 100% 1%
 reverse-complement 
Python 30.020.02?449  100% 0% 0% 33% †
PyPy 30.080.09?458  0% 0% 100% 0% †
 iobench 
Python 36.126.128,408367  1% 6% 1% 100%
PyPy 311.1611.2377,660367  1% 13% 1% 92%
 spectral-norm 
Python 30.180.18?394  95% 17% 21% 6% †
PyPy 30.200.211,140594  5% 100% 5% 0% †
 binary-trees 
Python 33.220.9660,196741  85% 88% 91% 86%
PyPy 32.061.07139,660741  76% 41% 38% 49%
 k-nucleotide 
Python 30.130.13?594  0% 8% 0% 100%
PyPy 30.140.14?594  0% 7% 7% 100%
 fasta-redux 
Python 30.290.291,8881115  3% 4% 0% 97%
PyPy 30.230.231,1401115  0% 5% 100% 4%
 chameneos-redux 
Python 3331.68177.208,8881191  49% 54% 48% 51%
PyPy 3185.5097.8267,6121191  43% 50% 38% 47%
 fasta 
Python 38.994.4596,8682016  56% 55% 52% 47% †
PyPy 31.901.9269,7521698  52% 6% 48% 2% †
 pystone 
Python 30.280.291,9402303  3% 4% 3% 97% †
PyPy 30.120.12?2303  8% 33% 100% 0% †
 fibonacci 
Python 30.670.689,136182  100% 9% 3% 3%
PyPy 30.270.271,020182  0% 4% 0% 100%
 fannkuch-redux 
Python 313.123.5053,336894  99% 97% 97% 91%
PyPy 33.261.3380,5961271  55% 58% 55% 88%
 jsonbench 
Python 33.553.5612,296322  1% 7% 3% 100%
PyPy 31.151.1776,476322  1% 7% 98% 3%
 meteor-contest 
Python 33.353.358,8401443  81% 6% 20% 1%
PyPy 30.890.9475,9801443  1% 99% 2% 2%
 richards 
Python 31.151.158,9322434  2% 10% 100% 3%
PyPy 30.280.281,1402434  0% 7% 96% 4%
 fib50 
Python 33.433.558,384136  1% 76% 2% 26%
PyPy 30.790.7972,656136  100% 5% 1% 3%
 n-body 
Python 344.7145.218,8281315  37% 30% 44% 11% †
PyPy 34.604.8268,9401315  3% 99% 5% 3% †
 thread-ring 
Python 332.3823.8413,176448  33% 38% 32% 29% †
PyPy 30.160.16?407  100% 6% 0% 0% †
 mandelbrot 
Python 378.4320.47196,0883832  98% 99% 99% 97%
No program
 binary-trees-redux
   No programs

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

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

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Python 3 and PyPy 3 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 3 : the new Python 

Python 3.3.1 (default, Apr 11 2013, 12:45:45)
[GCC 4.7.2] on linux

"3.x is the newest branch of Python and the intended future of the language."

"Van Rossum: Python is not too slow"

Home Page: Python 3.3.1 was released on April 7th, 2013.

Revised BSD license

  Home   Conclusions   License   Play