/mobile Handheld Friendly website

÷

 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 Java 7 program.


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 Java 7 program.

 Python 3 used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits †1/21/91/7
 regex-dna±1/31/2
 reverse-complement †1/5
 k-nucleotide12×±1/2
 binary-trees15×±1/2
 n-body45×1/3±
 fasta50×1/31/2
 fannkuch-redux61×1/2
 mandelbrot64×1/10±
 spectral-norm64×1/2
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/230×61×64×64×

† 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 Java 7 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Python 33.063.075,440255  1% 0% 0% 100% †
Java 711.755.1246,4881826  70% 67% 56% 39% †
 regex-dna 
Python 325.8912.98235,412478  40% 68% 40% 53%
Java 727.099.43708,060929  65% 83% 78% 63%
 reverse-complement 
Python 36.526.54601,488325  0% 0% 100% 0% †
Java 72.931.52294,7841661  32% 59% 58% 47% †
 k-nucleotide 
Python 3489.02161.22422,160647  62% 55% 97% 90%
Java 744.8312.93494,2641602  84% 81% 85% 99%
 binary-trees 
Python 3524.47139.16685,880626  98% 93% 93% 93%
Java 721.359.21525,4201007  50% 70% 48% 65%
 n-body 
Python 31,086.651,086.894,7161181  93% 0% 0% 7%
Java 724.4124.3913,9761424  0% 0% 0% 100%
 fasta 
Python 3246.95249.754,600788  24% 2% 25% 51%
Java 75.074.9914,9761507  2% 0% 100% 1%
 fannkuch-redux 
Python 34,138.161,045.6925,128797  99% 99% 98% 100%
Java 767.9117.1714,4601282  98% 99% 100% 100%
 mandelbrot 
Python 31,746.99438.656,772777  100% 100% 100% 100%
Java 727.146.9067,612796  98% 98% 99% 99%
 spectral-norm 
Python 31,062.11268.3227,732437  99% 99% 99% 99%
Java 716.394.2114,740950  97% 97% 98% 99%
 fasta-redux 
No program
Java 70.130.11?1443  0% 18% 0% 91%

† 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 Java 7 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 Java 7 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:56:47)
[GCC 4.7.2] on linux

"3.x is the newest branch of Python and the intended future of the language."

Home Page: Python 3.3.1 was released on April 7th, 2013.

Revised BSD license

  Home   Conclusions   License   Play