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

† 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.6616,780328  0% 0% 100% 0% 0% 0% 0% 1% †
 fib50 
Numba1.471.48119,832165  15% 14% 8% 4% 5% 13% 10% 99% †
Cython0.500.508,220159  100% 0% 0% 0% 0% 0% 0% 0% †
 fibonacci 
Numba1.571.59120,220164  38% 28% 31% 98% 41% 51% 31% 52% †
Cython0.500.509,412184  0% 100% 0% 0% 2% 0% 2% 0% †
 n-body 
Numba42.5942.63148,1161347  30% 67% 10% 9% 37% 16% 10% 15% †
Cython8.488.488,2841392  0% 0% 0% 1% 0% 1% 0% 100% †
 iobench 
Numba4.864.88131,784400  37% 7% 7% 9% 61% 5% 16% 4% †
Cython0.020.02?366  0% 0% 0% 0% 0% 0% 100% 0% †
 reverse-complement 
No program
Cython0.020.02?458  0% 0% 0% 100% 0% 0% 0% 0%
 regex-dna 
No program
Cython0.040.04?524  0% 20% 0% 0% 100% 0% 0% 0%
 pystone 
No program
Cython0.060.07?2401  0% 100% 0% 0% 0% 0% 0% 0%
 pidigits 
No program
Cython0.020.02?349  0% 0% 100% 0% 0% 0% 0% 0%
 chameneos-redux 
No program
Cython265.20221.398,2321203  6% 9% 7% 6% 8% 7% 10% 8%
 k-nucleotide 
No program
Cython0.070.07?618  0% 0% 0% 100% 12% 0% 0% 0%
 jsonbench 
No program
Cython2.142.1438,300323  0% 0% 0% 0% 0% 0% 100% 0%
 fasta-redux 
No program
Cython0.110.11?1169  0% 100% 0% 0% 0% 0% 0% 0%
 fasta 
No program
Cython2.102.108,772945  1% 0% 0% 0% 0% 100% 0% 0%
 richards 
No program
Cython0.520.538,2722467  0% 0% 2% 0% 100% 2% 0% 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,2281334  0% 0% 0% 0% 0% 0% 100% 0%
 thread-ring 
No program
Cython0.230.231,896419  0% 0% 100% 0% 0% 0% 0% 0%
 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