Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

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
 pidigits †1/124 ±
 regex-dna †1/4?±
 reverse-complement †1/3?±
 binary-trees1/31/2±
 iobench1/2 ±
 k-nucleotide †1/2?
 thread-ring± ±
 fannkuch-redux± ±
 spectral-norm †±?1/2
 fasta-redux±?±
 fasta † ±
 jsonbench ±
 pystone?±
 meteor-contest ±
 fib50 ±
 richards?±
 n-body ±
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/1241/1241/2±

† 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.020.02?379  25% 0% 0% 33% 0% 0% 0% 100% †
PyPy 32.842.8475,604322  76% 2% 0% 0% 1% 24% 1% 0% †
 regex-dna 
Python 30.040.04?524  0% 0% 100% 0% 0% 0% 0% 0% †
PyPy 30.160.16?524  100% 6% 0% 0% 12% 0% 6% 0% †
 reverse-complement 
Python 30.020.02?449  0% 33% 100% 0% 0% 0% 0% 0% †
PyPy 30.060.06?458  0% 0% 0% 0% 0% 0% 0% 100% †
 binary-trees 
Python 31.520.2980,548741  67% 69% 66% 64% 63% 59% 67% 79%
PyPy 32.280.90128,080741  63% 24% 24% 26% 27% 27% 36% 37%
 iobench 
Python 32.842.849,080367  2% 2% 0% 100% 0% 1% 1% 1%
PyPy 35.295.2974,204367  100% 0% 0% 1% 0% 0% 2% 0%
 k-nucleotide 
Python 30.120.06?2011  17% 20% 20% 83% 33% 17% 20% 20% †
PyPy 30.100.10?594  0% 100% 0% 0% 0% 9% 0% 0% †
 thread-ring 
Python 320.4538.9711,040448  4% 8% 5% 5% 4% 7% 3% 11%
PyPy 328.6137.1773,036448  19% 7% 4% 3% 12% 24% 5% 15%
 fannkuch-redux 
Python 35.430.7389,420894  88% 92% 93% 93% 95% 97% 93% 93%
PyPy 31.720.6780,0801008  14% 15% 55% 53% 47% 40% 46% 1%
 spectral-norm 
Python 30.100.10?394  0% 92% 0% 0% 0% 0% 0% 0% †
PyPy 30.090.09?594  0% 18% 100% 0% 11% 0% 0% 11% †
 fasta-redux 
Python 30.190.19?1115  100% 0% 0% 0% 0% 5% 0% 0%
PyPy 30.150.15?1115  6% 100% 0% 0% 0% 12% 0% 0%
 fasta 
Python 34.802.6663,2202016  39% 6% 54% 3% 7% 41% 32% 5% †
PyPy 31.361.3770,1481698  4% 1% 2% 1% 3% 100% 2% 2% †
 jsonbench 
Python 32.142.1513,136322  0% 2% 0% 1% 0% 1% 100% 1%
PyPy 30.960.9776,696322  0% 0% 1% 0% 0% 0% 100% 2%
 pystone 
Python 30.190.19?2300  5% 5% 0% 0% 0% 100% 0% 0%
PyPy 30.080.09?2300  0% 0% 88% 0% 0% 12% 11% 0%
 meteor-contest 
Python 32.092.109,5281443  1% 0% 0% 0% 0% 0% 0% 100%
PyPy 30.640.6574,0281443  3% 2% 100% 2% 0% 6% 2% 3%
 fib50 
Python 32.042.048,348136  2% 0% 0% 0% 0% 0% 100% 0%
PyPy 30.590.5970,684136  2% 0% 100% 0% 0% 2% 0% 2%
 richards 
Python 30.700.709,4242434  0% 0% 0% 0% 0% 100% 0% 1%
PyPy 30.180.18?2434  0% 0% 0% 100% 0% 6% 0% 10%
 n-body 
Python 328.8328.838,8441315  0% 0% 0% 0% 0% 0% 100% 0%
PyPy 33.193.1967,4641315  0% 0% 100% 0% 0% 1% 0% 1%
 mandelbrot 
Python 337.124.84294,1843852  96% 98% 96% 94% 94% 98% 97% 97%
No program
 templates 
Python 30.630.6418,364322  4% 0% 0% 100% 0% 0% 0% 0%
No program
 chameneos-redux 
Python 3182.63264.5514,7841191  5% 3% 3% 2% 12% 11% 12% 11%
No program
 fibonacci 
No program
PyPy 30.160.16?182  94% 0% 6% 6% 0% 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