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

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

Each table row shows, for one named benchmark, how much the fastest Python 3 program used compared to the fastest JavaScript V8 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
 reverse-complement±±±
 k-nucleotide
 fasta ±
 regex-dna1/2±
 binary-trees11×±±
 n-body23× ±
 fannkuch-redux34× 
 spectral-norm60× ±
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±29×60×60×

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

 3 : Measurements - Are the Python 3 programs faster?

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 JavaScript V8 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 reverse-complement 
Python 35.235.25258,596800  0% 2% 1% 100%
JavaScript V87.307.31252,840787  0% 1% 0% 100%
 k-nucleotide 
Python 3295.95296.24152,2961937  1% 1% 1% 100%
JavaScript V895.9296.0242,1841249  0% 3% 1% 100%
 fasta 
Python 3108.42108.464,328977  0% 0% 1% 100%
JavaScript V822.2822.3029,800923  0% 1% 1% 100%
 regex-dna 
Python 323.5623.68234,048478  1% 1% 0% 100%
JavaScript V83.383.39397,712373  0% 1% 1% 100%
 binary-trees 
Python 3456.23456.60470,132596  1% 1% 0% 100%
JavaScript V843.4043.46472,452467  0% 1% 1% 100%
 n-body 
Python 3967.81968.076,0081228  1% 1% 0% 100%
JavaScript V841.6541.666,8681527  0% 5% 1% 100%
 fannkuch-redux 
Python 32,467.602,468.3128,000944  1% 1% 0% 100%
JavaScript V872.4672.486,152539  0% 1% 1% 100%
 spectral-norm 
Python 3950.08950.334,972328  0% 0% 1% 100%
JavaScript V815.7015.718,240328  0% 1% 1% 100%
 pidigits 
Python 30.140.26280335  0% 7% 0% 100%
No program
 mandelbrot 
Python 34.534.6032,140686  0% 0% 2% 99%
JavaScript V8Bad Output
 fasta-redux
   No programs

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

Remember - those are just the fastest Python 3 and JavaScript V8 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 JavaScript V8 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.4.3 (default, Apr 5 2015, 10:03:09) [GCC 4.8.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.4.3 was released Wednesday, February 25th, 2015.

Revised BSD license

  Home   Conclusions   License   Play