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.
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 † | 3× | ± | ||
fib50 † | 3× | ± | ||
n-body † | 5× | ± | ||
iobench † | 257× | ? | ± |
Numba used what fraction? used how many times more? | |||||||
---|---|---|---|---|---|---|---|
Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
(Elapsed secs) | 3× | 3× | 3× | 4× | 131× | 257× | 257× |
† possible mismatch - one-core program compared to multi-core program.
± read the measurements and then read the program source code.
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 | |||||
Numba | 1.62 | 1.64 | 121,232 | 344 | 24% 19% 99% 23% 24% 24% 26% 19% † |
Cython | 0.64 | 0.65 | 18,396 | 328 | 2% 2% 2% 0% 3% 0% 100% 2% † |
fib50 | |||||
Numba | 1.47 | 1.48 | 119,832 | 165 | 15% 14% 8% 4% 5% 13% 10% 99% † |
Cython | 0.53 | 0.54 | 8,752 | 159 | 2% 0% 100% 4% 0% 2% 2% 4% † |
n-body | |||||
Numba | 42.59 | 42.63 | 148,116 | 1347 | 30% 67% 10% 9% 37% 16% 10% 15% † |
Cython | 8.33 | 8.33 | 8,944 | 1392 | 0% 100% 0% 0% 1% 0% 0% 1% † |
iobench | |||||
Numba | 4.86 | 4.88 | 131,784 | 400 | 37% 7% 7% 9% 61% 5% 16% 4% † |
Cython | 0.02 | 0.02 | ? | 366 | 0% 0% 0% 0% 0% 100% 0% 0% † |
reverse-complement | |||||
Cython | 0.02 | 0.02 | ? | 449 | 0% 0% 0% 0% 0% 0% 100% 0% |
regex-dna | |||||
Cython | 0.04 | 0.04 | ? | 524 | 20% 0% 0% 0% 100% 0% 0% 0% |
pystone | |||||
Cython | 0.07 | 0.07 | ? | 2401 | 12% 0% 88% 0% 0% 0% 0% 0% |
pidigits | |||||
Cython | 0.02 | 0.02 | ? | 349 | 0% 0% 100% 0% 0% 33% 0% 0% |
chameneos-redux | |||||
Cython | 177.89 | 271.05 | 12,888 | 1203 | 6% 3% 3% 3% 11% 10% 10% 11% |
k-nucleotide | |||||
Cython | 0.07 | 0.07 | ? | 618 | 100% 22% 0% 0% 0% 0% 0% 0% |
jsonbench | |||||
Cython | 2.16 | 2.16 | 13,212 | 323 | 3% 0% 1% 0% 0% 1% 0% 100% |
fibonacci | |||||
Numba | 1.57 | 1.59 | 120,220 | 164 | 38% 28% 31% 98% 41% 51% 31% 52% |
fasta-redux | |||||
Cython | 0.11 | 0.12 | ? | 1169 | 100% 0% 0% 0% 0% 0% 0% 0% |
fasta | |||||
Cython | 2.51 | 2.52 | 8,880 | 945 | 4% 0% 0% 100% 0% 1% 0% 0% |
richards | |||||
Cython | 0.58 | 0.58 | 9,072 | 2467 | 100% 2% 0% 0% 2% 0% 2% 0% |
mandelbrot | |||||
Numba | 61.51 | 8.68 | 133,960 | 3886 | 94% 91% 96% 93% 93% 98% 92% 95% |
spectral-norm | |||||
Numba | 1.31 | 1.34 | 131,484 | 416 | 15% 9% 10% 8% 8% 9% 13% 99% |
meteor-contest | |||||
Cython | 2.35 | 2.35 | 11,184 | 1334 | 100% 0% 0% 0% 2% 1% 0% 0% |
thread-ring | |||||
Cython | 0.23 | 0.23 | 3,120 | 419 | 4% 0% 100% 0% 0% 0% 4% 4% |
binary-trees | |||||
Numba | 357.88 | 63.59 | 154,632 | 734 | 73% 70% 76% 94% 76% 74% 69% 75% |
fannkuch-redux | |||||
binary-trees-redux | |||||
† possible mismatch - one-core program compared to multi-core program.
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.
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.