Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.5 KB

examples.rst

File metadata and controls

52 lines (41 loc) · 1.5 KB

Examples

Mandelbrot

../../../numba/tests/doc_examples/test_examples.py

Moving average

../../../numba/tests/doc_examples/test_examples.py

Multi-threading

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