1

When profiling code with cprofile, I noticed that there appear a lot of numba entries referring to the numba compiler. I know that the computation time is high at the first run of the script due to compiling.

The attached screenshot however shows cprofile entries from a script which already should be compiled (The script was run at least twice and also the total computation time decreased).

Because the functions shown in the screenshot still consume a lot of time, I asked myself if I do anything wrong using numba. Additionally, it does not make sense to call a compiler function if the code is already compiled. Is there a way to find out if compiled functions are already in storage?enter image description here

talonmies
  • 70,661
  • 34
  • 192
  • 269
D Cro
  • 85
  • 6
  • This is hard to know if you are doing something wrong without the code but you can get the compiled signatures with `your_function.nopython_signatures`. Besides this, there is a Numba cache but it is only used if the flag `cache=True` is explicitly set. – Jérôme Richard Apr 01 '22 at 16:08

0 Answers0