Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

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
 templates † ±
 fib50 † ±
 n-body † ±
 iobench †257×?±
 Numba used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)131×257×257×

† 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
 templates 
Numba1.621.64121,232344  24% 19% 99% 23% 24% 24% 26% 19% †
Cython0.640.6518,396328  2% 2% 2% 0% 3% 0% 100% 2% †
 fib50 
Numba1.471.48119,832165  15% 14% 8% 4% 5% 13% 10% 99% †
Cython0.530.548,752159  2% 0% 100% 4% 0% 2% 2% 4% †
 n-body 
Numba42.5942.63148,1161347  30% 67% 10% 9% 37% 16% 10% 15% †
Cython8.338.338,9441392  0% 100% 0% 0% 1% 0% 0% 1% †
 iobench 
Numba4.864.88131,784400  37% 7% 7% 9% 61% 5% 16% 4% †
Cython0.020.02?366  0% 0% 0% 0% 0% 100% 0% 0% †
 reverse-complement 
No program
Cython0.020.02?449  0% 0% 0% 0% 0% 0% 100% 0%
 regex-dna 
No program
Cython0.040.04?524  20% 0% 0% 0% 100% 0% 0% 0%
 pystone 
No program
Cython0.070.07?2401  12% 0% 88% 0% 0% 0% 0% 0%
 pidigits 
No program
Cython0.020.02?349  0% 0% 100% 0% 0% 33% 0% 0%
 chameneos-redux 
No program
Cython177.89271.0512,8881203  6% 3% 3% 3% 11% 10% 10% 11%
 k-nucleotide 
No program
Cython0.070.07?618  100% 22% 0% 0% 0% 0% 0% 0%
 jsonbench 
No program
Cython2.162.1613,212323  3% 0% 1% 0% 0% 1% 0% 100%
 fibonacci 
Numba1.571.59120,220164  38% 28% 31% 98% 41% 51% 31% 52%
No program
 fasta-redux 
No program
Cython0.110.12?1169  100% 0% 0% 0% 0% 0% 0% 0%
 fasta 
No program
Cython2.512.528,880945  4% 0% 0% 100% 0% 1% 0% 0%
 richards 
No program
Cython0.580.589,0722467  100% 2% 0% 0% 2% 0% 2% 0%
 mandelbrot 
Numba61.518.68133,9603886  94% 91% 96% 93% 93% 98% 92% 95%
No program
 spectral-norm 
Numba1.311.34131,484416  15% 9% 10% 8% 8% 9% 13% 99%
No program
 meteor-contest 
No program
Cython2.352.3511,1841334  100% 0% 0% 0% 2% 1% 0% 0%
 thread-ring 
No program
Cython0.230.233,120419  4% 0% 100% 0% 0% 0% 4% 4%
 binary-trees 
Numba357.8863.59154,632734  73% 70% 76% 94% 76% 74% 69% 75%
No program
 fannkuch-redux
   No programs
 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