Python Interpreters Benchmarks
x64 ArchLinux : Intel® i5-7200U®

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/235 ±
 thread-ring †1/71 ±
 fib501/5 ±
 n-body1/4 ±
 fasta-redux1/2 ±
 pystone1/2 ±
 richards± ±
 fasta †± 1/2
 pidigits±?±
 chameneos-redux± ±
 fibonacci± ±
 templates± ±
 reverse-complement †±?±
 regex-dna±?±
 jsonbench± ±
 k-nucleotide †±?±
 meteor-contest± ±
 Cython used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/2351/241/2±±±±

† 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.020.02?366  0% 0% 0% 100% †
Python 35.405.418,888367  71% 5% 32% 100% †
 thread-ring 
Cython0.350.351,708419  6% 3% 100% 3% †
Python 333.8824.7313,388448  35% 31% 25% 33% †
 fib50 
Cython0.650.688,328159  100% 3% 1% 1%
Python 33.253.258,476136  6% 2% 100% 1%
 n-body 
Cython10.7711.258,6161392  100% 1% 2% 1%
Python 340.0140.049,0601315  6% 100% 1% 1%
 fasta-redux 
Cython0.170.17?1169  11% 100% 0% 6%
Python 30.280.281,6881115  7% 97% 7% 7%
 pystone 
Cython0.130.18?2401  89% 89% 100% 100%
Python 30.270.271,6642300  100% 17% 8% 8%
 richards 
Cython0.600.608,4482467  7% 100% 2% 0%
Python 30.880.889,0682434  8% 100% 2% 1%
 fasta 
Cython3.343.498,652945  100% 2% 2% 1% †
Python 37.304.0812,8322016  44% 58% 54% 34% †
 pidigits 
Cython0.030.03?349  0% 0% 25% 100%
Python 30.030.03?379  0% 25% 100% 0%
 chameneos-redux 
Cython337.11166.108,4601203  50% 45% 47% 44%
Python 3340.10171.338,6801191  49% 44% 46% 43%
 fibonacci 
Cython0.670.689,256184  6% 3% 99% 3%
Python 30.680.689,456182  8% 97% 4% 1%
 templates 
Cython0.950.9616,284328  9% 95% 2% 4%
Python 30.960.9716,192322  5% 2% 100% 5%
 reverse-complement 
Cython0.020.02?458  0% 100% 0% 0% †
Python 30.020.02?449  33% 0% 0% 100% †
 regex-dna 
Cython0.050.05?524  0% 0% 100% 0%
Python 30.050.05?524  0% 0% 100% 0%
 jsonbench 
Cython3.133.2811,844323  100% 1% 2% 2%
Python 33.183.1812,528322  7% 1% 2% 99%
 k-nucleotide 
Cython0.090.09?618  0% 11% 100% 0% †
Python 30.100.07?801  43% 100% 29% 0% †
 meteor-contest 
Cython3.613.7811,1521334  100% 2% 2% 2%
Python 33.043.049,5081443  6% 1% 1% 100%
 fannkuch-redux 
No program
Python 311.993.1912,420894  98% 94% 96% 96%
 binary-trees 
No program
Python 32.980.9015,752741  91% 83% 82% 82%
 spectral-norm 
No program
Python 30.150.16?394  6% 56% 17% 69%
 mandelbrot
   No programs
 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