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 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 : 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 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±1/2
 k-nucleotide1/2
 regex-dna1/2±
 fasta ±
 binary-trees10×±±
 n-body26× ±
 fannkuch-redux31× ±
 spectral-norm48× ±
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±28×48×48×

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 reverse-complement 
Python 35.986.001,008,592325  0% 1% 1% 100%
JavaScript V87.757.76404,052787  0% 1% 1% 100%
 k-nucleotide 
Python 3372.03374.89456,532647  0% 1% 1% 100%
JavaScript V8128.05128.1976,4361249  0% 1% 1% 100%
 regex-dna 
Python 323.0823.19257,976478  0% 1% 1% 100%
JavaScript V83.443.45584,372373  0% 1% 1% 100%
 fasta 
Python 3156.10160.135,572792  1% 0% 0% 100%
JavaScript V821.9521.9752,068923  1% 1% 1% 100%
 binary-trees 
Python 3479.82480.361,123,040626  0% 1% 1% 100%
JavaScript V850.0750.15944,176467  0% 0% 1% 100%
 n-body 
Python 3932.49932.795,5721181  1% 0% 0% 100%
JavaScript V835.8135.829,3041287  1% 0% 1% 100%
 fannkuch-redux 
Python 32,333.002,333.785,416385  1% 0% 0% 100%
JavaScript V875.5575.578,476539  1% 0% 0% 100%
 spectral-norm 
Python 3746.94747.206,468328  1% 0% 0% 100%
JavaScript V815.7115.7110,536328  1% 0% 1% 100%
 pidigits 
Python 30.130.14?256  0% 0% 0% 100%
No program
 mandelbrot 
Python 37.537.54132,164777  1% 0% 1% 100%
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.0 (default, Mar 17 2014, 08:05:26) [GCC 4.8.1] 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.0 was released on March 16th, 2014.

Revised BSD license

  Home   Conclusions   License   Play