vs

 1 : Are the Cython programs faster? At a glance.

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

Each table row shows, for one named benchmark, how much the fastest Cython program used compared to the fastest Python 3 program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Cython used what fraction? used how many times more? 
Benchmark Time Memory Code
 iobench †1/144 ±
 fib501/4 ±
 n-body1/2 ±
 thread-ring1/2 ±
 pystone1/2 ±
 binary-trees1/2±±
 richards1/2 ±
 fasta-redux± ±
 k-nucleotide †±?±
 templates± ±
 chameneos-redux± ±
 jsonbench± ±
 fibonacci± ±
 meteor-contest± ±
 regex-dna±?±
 mandelbrot± ±
 pidigits †±?±
 reverse-complement±?±
 fannkuch-redux± ±
 fasta †± 1/2
 spectral-norm †15×?±
 Cython used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/1441/1441/2±±15×

† possible mismatch - one-core program compared to multi-core program.

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

 3 : Are the Cython 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 Cython program are shown for comparison against measurements of the fastest Python 3 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 iobench 
Cython0.030.03?366  0% 0% 100% 25% †
Python 34.744.748,852367  0% 100% 0% 0% †
 fib50 
Cython1.091.098,816156  100% 2% 4% 0%
Python 34.344.349,196136  0% 0% 0% 100%
 n-body 
Cython25.6525.658,8401315  1% 0% 0% 100%
Python 362.4362.438,8041315  0% 0% 0% 100%
 thread-ring 
Cython0.350.351,764407  3% 100% 3% 0%
Python 30.820.829,068407  99% 0% 2% 1%
 pystone 
Cython0.220.228882288  5% 0% 100% 0%
Python 30.380.391,7482303  0% 0% 3% 100%
 binary-trees 
Cython3.050.8767,172706  85% 86% 87% 94%
Python 35.401.4865,892741  90% 93% 90% 94%
 richards 
Cython1.041.048,7122467  11% 3% 89% 0%
Python 31.761.769,1802434  100% 0% 0% 0%
 fasta-redux 
Cython0.300.301,7081115  100% 6% 0% 0%
Python 30.400.408721115  100% 0% 3% 0%
 k-nucleotide 
Cython0.130.13?594  14% 100% 0% 15% †
Python 30.150.15?594  0% 0% 6% 100% †
 templates 
Cython1.401.4016,644328  100% 0% 4% 1%
Python 31.571.5720,924322  100% 1% 0% 1%
 chameneos-redux 
Cython160.1988.278,8361203  40% 39% 39% 39%
Python 3159.8591.858,8561191  38% 35% 36% 38%
 jsonbench 
Cython4.794.7912,892323  2% 100% 1% 0%
Python 34.894.8912,812322  1% 0% 100% 0%
 fibonacci 
Cython0.790.799,400184  1% 99% 0% 1%
Python 30.800.809,372182  0% 100% 0% 1%
 meteor-contest 
Cython4.564.5611,2281334  1% 2% 0% 100%
Python 34.644.649,0881443  0% 0% 0% 100%
 regex-dna 
Cython0.060.06?524  0% 0% 100% 0%
Python 30.060.06?524  86% 25% 0% 0%
 mandelbrot 
Cython100.6325.82189,7323832  98% 96% 100% 99%
Python 3101.2825.82188,4523832  99% 97% 98% 99%
 pidigits 
Cython0.040.04?379  20% 25% 100% 0% †
Python 30.040.04?379  100% 0% 0% 0% †
 reverse-complement 
Cython0.030.03?458  0% 0% 0% 80%
Python 30.030.03?449  0% 75% 0% 0%
 fannkuch-redux 
Cython21.875.6856,2241271  98% 98% 95% 98%
Python 319.655.0855,660894  96% 96% 98% 97%
 fasta 
Cython8.368.378,916904  100% 0% 0% 1% †
Python 315.296.27421,2482016  64% 82% 58% 41% †
 spectral-norm 
Cython7.792.1755,920575  90% 89% 90% 92% †
Python 30.140.15?394  0% 100% 0% 0% †
 binary-trees-redux
   No programs

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Cython programs for these benchmarks?

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Cython and Python 3 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.

 Cython : Python compiled to C 

 

Revised BSD license

  Home   Conclusions   License   Play