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/114 ±
 iobench †1/5 ±
 regex-dna †1/4 ±
 templates1/3 ±
 reverse-complement1/3?±
 jsonbench †1/2 ±
 binary-trees±1/2±
 k-nucleotide †±?±
 spectral-norm †±?1/2
 chameneos-redux± ±
 fasta-redux± ±
 fasta † ±
 fibonacci ±
 fannkuch-redux ±
 pystone?±
 meteor-contest † ±
 fib50 ±
 thread-ring?±
 n-body † ±
 richards † ±
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/1141/1141/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.030.03?379  100% 0% 0% 0% †
PyPy 33.503.5575,484322  31% 94% 27% 27% †
 iobench 
Python 34.604.619,164367  1% 1% 2% 100% †
PyPy 321.8021.9274,348367  94% 15% 8% 8% †
 regex-dna 
Python 30.050.05?524  0% 100% 0% 0% †
PyPy 30.210.211,132524  38% 86% 100% 45% †
 templates 
Python 31.161.1621,100322  1% 3% 100% 2%
PyPy 33.523.56105,072322  6% 100% 7% 6%
 reverse-complement 
Python 30.020.03?449  0% 0% 100% 0%
PyPy 30.070.07?449  0% 100% 0% 13%
 jsonbench 
Python 33.613.6211,756322  2% 1% 2% 100% †
PyPy 36.306.3780,564322  19% 28% 89% 17% †
 binary-trees 
Python 33.761.1159,900706  95% 83% 84% 83%
PyPy 32.671.3090,260706  50% 41% 77% 47%
 k-nucleotide 
Python 30.110.12?594  100% 0% 0% 0% †
PyPy 30.120.12?594  8% 15% 8% 100% †
 spectral-norm 
Python 30.130.13?394  8% 0% 0% 100% †
PyPy 30.130.14?594  0% 14% 100% 7% †
 chameneos-redux 
Python 3159.9289.519,6001191  40% 41% 37% 44%
PyPy 3151.0182.7864,0961191  44% 43% 43% 44%
 fasta-redux 
Python 30.280.281,8401115  0% 7% 100% 3%
PyPy 30.250.251,1601115  0% 4% 100% 4%
 fasta 
Python 38.794.2475,1322016  55% 63% 63% 32% †
PyPy 31.971.9966,7161698  2% 3% 1% 99% †
 fibonacci 
Python 30.680.689,656182  51% 69% 6% 7%
PyPy 30.300.301,308182  17% 23% 100% 24%
 fannkuch-redux 
Python 312.623.2953,628894  99% 94% 98% 97%
PyPy 33.321.3877,4721271  59% 91% 57% 58%
 pystone 
Python 30.280.281,8362303  3% 7% 100% 0%
PyPy 30.100.11?2303  9% 10% 100% 0%
 meteor-contest 
Python 33.473.489,5601443  100% 2% 1% 1% †
PyPy 31.181.2273,8681443  42% 35% 45% 99% †
 fib50 
Python 33.223.239,200136  1% 25% 1% 75%
PyPy 30.850.8568,744136  2% 100% 7% 0%
 thread-ring 
Python 30.570.579,104407  100% 0% 0% 0%
PyPy 30.140.14?407  0% 0% 100% 7%
 n-body 
Python 344.4444.518,9161315  23% 1% 78% 1% †
PyPy 38.368.8966,6921315  67% 65% 48% 42% †
 richards 
Python 31.331.339,3722434  100% 1% 2% 1% †
PyPy 30.250.261,2962434  4% 12% 96% 12% †
 mandelbrot 
Python 367.6817.70190,5283832  97% 99% 98% 96%
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