vs

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

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

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

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

 Numba used what fraction? used how many times more? 
Benchmark Time Memory Code
 mandelbrot± ±
 templates± ±
 fib50 ±
 fibonacci ±
 binary-trees±±
 n-body † ±
 iobench212×?±
 Numba used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±212×

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

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

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 mandelbrot 
Numba80.0320.42100,3243865  99% 98% 97% 98%
Cython72.9118.51186,9643832  98% 98% 99% 100%
 templates 
Numba1.461.4677,320335  1% 0% 0% 99%
Cython1.241.2421,220328  1% 69% 1% 32%
 fib50 
Numba1.341.3473,180152  0% 1% 0% 100%
Cython0.800.809,144156  1% 1% 0% 100%
 fibonacci 
Numba1.201.2074,964160  0% 1% 0% 100%
Cython0.670.679,656184  0% 100% 0% 3%
 binary-trees 
Numba3.991.2364,276702  78% 78% 79% 90%
Cython1.850.5560,892735  82% 80% 84% 93%
 n-body 
Numba58.4358.4497,4921333  0% 100% 0% 0% †
Cython12.8512.858,9321392  8% 54% 57% 8% †
 iobench 
Numba4.884.8880,276384  0% 0% 100% 0%
Cython0.020.02?366  0% 0% 100% 0%
 fasta 
No program
Cython4.314.318,792945  0% 0% 100% 0%
 richards 
No program
Cython0.750.758,6882467  0% 100% 0% 1%
 jsonbench 
No program
Cython3.613.6211,884323  100% 0% 0% 0%
 regex-dna 
No program
Cython0.050.05?524  0% 0% 0% 100%
 k-nucleotide 
No program
Cython0.090.09?618  0% 0% 10% 100%
 fannkuch-redux 
No program
Cython10.202.6653,6121027  96% 97% 94% 98%
 chameneos-redux 
No program
Cython114.6961.868,7681203  31% 37% 31% 38%
 pystone 
No program
Cython0.090.09?2402  0% 0% 100% 0%
 meteor-contest 
No program
Cython3.493.4911,4441334  1% 74% 0% 27%
 reverse-complement 
No program
Cython0.020.02?449  0% 0% 0% 100%
 fasta-redux 
No program
Cython0.170.17?1169  6% 100% 0% 0%
 spectral-norm 
Numba0.920.9284,664663  0% 3% 49% 48%
No program
 pidigits 
No program
Cython0.030.03?349  67% 0% 0% 0%
 thread-ring 
No program
Cython0.280.281,864419  3% 72% 11% 29%
 binary-trees-redux
   No programs

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

 4 : Are there other Numba programs for these benchmarks?

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

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

 5 : Are there other faster programs for these benchmarks?

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

 Numba : Numba JIT compiler 

 

Revised BSD license

  Home   Conclusions   License   Play