÷

 Step 1 : Are the Python CPython programs faster? At a glance.

This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each chart bar shows, for one unidentified benchmark, how much the fastest Python CPython program used compared to the fastest Java 6 -server program.


 Step 2 : Are the Python CPython programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each table row shows, for one named benchmark, how much the fastest Python CPython program used compared to the fastest Java 6 -server program.

 Python CPython used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits±1/671/2
 regex-dna±1/41/3
 reverse-complement±1/2
 k-nucleotide±1/3
 binary-trees24×±±
 fasta27×1/41/2
 chameneos-redux31×1/41/2
 spectral-norm60×1/2
 n-body61×1/4±
 mandelbrot62×1/21/2
 fannkuch180×1/51/3

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

 Step 3 : Are the Python CPython programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.

For each named benchmark, measurements of the fastest Python CPython program are shown for comparison against measurements of the fastest Java 6 -server program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Python CPython54.7454.743,596407  100% 0% 0% 0%
Java 6 -server59.1858.03240,912800  34% 23% 31% 14%
 regex-dna 
Python CPython11.7311.73196,492314  0% 0% 100% 0%
Java 6 -server29.5011.81694,708929  87% 54% 54% 55%
 reverse-complement 
Python CPython6.786.78561,860288  0% 40% 61% 0%
Java 6 -server3.383.32473,716592  0% 2% 1% 98%
 k-nucleotide 
Python CPython277.7284.94441,680519  54% 94% 82% 96%
Java 6 -server46.2813.60476,3161602  86% 92% 81% 81%
 binary-trees 
Python CPython980.23279.06674,024626  86% 89% 85% 90%
Java 6 -server14.1311.68460,636603  28% 24% 55% 14%
 fasta 
Python CPython208.55208.542,928779  61% 23% 4% 12%
Java 6 -server7.757.7212,8081240  1% 100% 0% 1%
 chameneos-redux 
Python CPython237.86180.723,024869  43% 32% 29% 27%
Java 6 -server13.675.8212,9521377  59% 50% 54% 60%
 spectral-norm 
Python CPython942.71242.9423,632428  98% 97% 98% 95%
Java 6 -server15.934.0712,736950  97% 100% 98% 97%
 n-body 
Python CPython1,443.101,443.022,9321105  86% 7% 1% 7%
Java 6 -server23.7023.7412,6081424  0% 100% 0% 0%
 mandelbrot 
Python CPython2,882.02720.5423,468425  100% 100% 100% 100%
Java 6 -server45.2111.5444,768903  98% 98% 98% 99%
 fannkuch 
Python CPython3,232.093,231.902,852387  36% 8% 48% 7%
Java 6 -server65.4317.9413,9401150  99% 99% 99% 68%

 Step 4 : Are there other Python CPython programs for these benchmarks?

Remember - those are just the fastest Python CPython and Java 6 -server programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Python CPython.

Maybe one of those other Python CPython programs is fastest on a different OS/machine.

 Step 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Python CPython and Java 6 -server 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 CPython : uncluttered imperative programming plus objects 

Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2

Online book: Dive Into Python

Home Page: http://www.python.org/

Download: http://www.python.org/download/

Revised BSD license

  Home   Flawed   Fastest   License   Help