Skip to content

Numba FAQ

Sylwester Arabas edited this page May 16, 2023 · 3 revisions

How to profile Numba code?

We do not know!
Related StackOverflow questions:

How to disable the JIT compilation?

Set the NUMBA_DISABLE_JIT env var to 1, e.g. a good starting point for debugging tests would be:

NUMBA_DISABLE_JIT=1 pytest -We tests

How to speed JIT-compilation up?

Setting the NUMBA_OPT to 1 (instead of the default of 3) disables some time-consuming compile-time optimisations (hence potentially has a run-time trade-off, see https://numba.pydata.org/numba-doc/0.17.0/reference/envvars.html#envvar-NUMBA_OPT), worth considering when running tests, i.e.:

NUMBA_OPT=1 pytest -We tests
Clone this wiki locally