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/19 ±
 iobench1/6 ±
 mandelbrot1/3 ±
 templates1/2 ±
 regex-dna1/2?±
 jsonbench± ±
 reverse-complement †±?±
 binary-trees±1/6±
 chameneos-redux± ±
 spectral-norm±?1/2
 fasta-redux± ±
 k-nucleotide±?±
 fasta † ±
 fibonacci ±
 fannkuch-redux ±
 fib50 ±
 meteor-contest ±
 pystone?±
 thread-ring?±
 richards ±
 n-body ±
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/191/19±±

† 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.030.03?379  0% 0% 0% 100%
PyPy 30.510.5173,760379  0% 0% 2% 98%
 iobench 
Python 33.573.578,728367  100% 0% 0% 0%
PyPy 320.3220.3267,900367  0% 100% 0% 0%
 mandelbrot 
Python 367.7917.28187,1363832  97% 97% 99% 99%
PyPy 3212.0754.35136,7643832  99% 97% 97% 98%
 templates 
Python 31.241.2421,180322  0% 0% 1% 100%
PyPy 32.992.9995,628322  0% 17% 0% 83%
 regex-dna 
Python 30.050.05?524  0% 0% 100% 0%
PyPy 30.080.09?524  0% 0% 100% 0%
 jsonbench 
Python 33.613.6112,148322  0% 1% 0% 100%
PyPy 35.235.2375,588322  0% 80% 0% 20%
 reverse-complement 
Python 30.020.03?449  33% 0% 100% 0% †
PyPy 30.030.03?458  100% 0% 0% 0% †
 binary-trees 
Python 33.471.0259,132741  83% 82% 83% 95%
PyPy 32.270.95325,796741  67% 61% 51% 61%
 chameneos-redux 
Python 3120.8065.948,8321191  36% 34% 35% 33%
PyPy 3102.9453.5859,4881191  39% 36% 33% 31%
 spectral-norm 
Python 30.120.12?394  0% 0% 100% 8%
PyPy 30.090.09?594  100% 0% 0% 0%
 fasta-redux 
Python 30.280.281,7801115  0% 100% 3% 4%
PyPy 30.200.211,3481115  100% 0% 5% 0%
 k-nucleotide 
Python 30.110.11?594  0% 100% 9% 0%
PyPy 30.080.08?594  89% 0% 0% 11%
 fasta 
Python 39.234.2481,3362016  68% 90% 22% 40% †
PyPy 31.791.7960,0001698  0% 1% 0% 100% †
 fibonacci 
Python 30.670.679,516182  1% 0% 99% 0%
PyPy 30.220.231,348182  0% 4% 100% 0%
 fannkuch-redux 
Python 312.423.3153,996894  93% 91% 98% 93%
PyPy 32.890.94267,7361008  75% 74% 88% 72%
 fib50 
Python 33.243.249,352136  0% 69% 0% 32%
PyPy 30.800.8067,852136  100% 0% 0% 0%
 meteor-contest 
Python 33.443.449,2641443  0% 50% 0% 50%
PyPy 30.830.8469,0241443  0% 1% 0% 100%
 pystone 
Python 30.290.291,9442303  0% 0% 0% 100%
PyPy 30.060.06?2303  100% 0% 0% 0%
 thread-ring 
Python 30.570.579,120407  0% 2% 0% 100%
PyPy 30.100.10?407  100% 0% 0% 0%
 richards 
Python 31.281.289,2762434  1% 0% 99% 0%
PyPy 30.210.211,3402434  5% 0% 95% 0%
 n-body 
Python 343.2343.238,8681315  0% 100% 0% 0%
PyPy 36.906.9158,1321315  100% 0% 0% 0%
 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