../../../numba/tests/doc_examples/test_examples.py
../../../numba/tests/doc_examples/test_examples.py
The code below showcases the potential performance improvement when using the nogil <jit-nogil>
feature. For example, on a 4-core machine, the following results were printed:
numpy (1 thread) 145 ms
numba (1 thread) 128 ms
numba (4 threads) 35 ms
Note
If preferred it's possible to use the standard concurrent.futures module rather than spawn threads and dispatch tasks by hand.
../../../numba/tests/doc_examples/test_examples.py