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 C# Mono 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 C# Mono 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
 regex-dna1/3±±
 pidigits± 1/4
 reverse-complement1/3
 k-nucleotide±1/2
 binary-trees †±
 spectral-norm29× 1/2
 fasta33× ±
 fannkuch-redux35× ±
 n-body44× ±
 mandelbrot57× ±
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/31/318×35×57×57×

† 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 C# Mono program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 regex-dna 
Python 323.8111.01248,260478  37% 72% 45% 64%
C# Mono86.7134.54344,632638  58% 70% 58% 66%
 pidigits 
Python 33.053.065,332256  1% 1% 0% 100%
C# Mono4.444.4520,8681026  99% 0% 1% 2%
 reverse-complement 
Python 36.536.55781,144325  0% 1% 0% 100%
C# Mono2.552.56175,8881099  1% 79% 1% 21%
 k-nucleotide 
Python 3488.50161.33364,488647  89% 60% 98% 56%
C# Mono88.1228.50323,9201404  83% 63% 84% 80%
 binary-trees 
Python 3526.56139.26688,512626  93% 96% 96% 94% †
C# Mono20.7420.74134,020654  0% 39% 1% 61% †
 spectral-norm 
Python 31,026.66258.4230,260437  99% 99% 99% 99%
C# Mono32.388.8221,5521063  98% 89% 90% 90%
 fasta 
Python 3241.56246.324,324788  30% 24% 15% 33%
C# Mono7.507.5119,8521180  0% 1% 100% 0%
 fannkuch-redux 
Python 34,000.061,012.0627,840797  99% 99% 98% 100%
C# Mono113.2929.2421,1761096  97% 95% 97% 98%
 n-body 
Python 3984.27984.534,2521181  0% 100% 0% 0%
C# Mono22.5722.5820,7481305  100% 0% 0% 1%
 mandelbrot 
Python 31,837.41483.667,488777  100% 94% 93% 94%
C# Mono31.228.4352,928986  91% 98% 91% 91%
 fasta-redux 
No program
C# Mono0.520.5318,9441438  2% 92% 2% 7%

† 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 C# Mono 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 C# Mono 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:23:52) [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