-
Notifications
You must be signed in to change notification settings - Fork 0
Numba FAQ
Sylwester Arabas edited this page May 16, 2023
·
3 revisions
How to profile Numba code?
We do not know!
Related StackOverflow questions:
- https://stackoverflow.com/questions/54545511/using-line-profiler-with-numba-jitted-functions
- https://stackoverflow.com/questions/55213687/python-how-to-profile-code-written-with-numba-njit-decorators
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