Time taken to import the library #8
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi I use numba jit compilation to speed up the simulation and for that it needs to compile the model functions on the first run through. In the aquacrop init.py I run a test simulation so that this compilation occurs when the user first imports the module rather than when they run their first simulation. Although not ideal I decided the trade offs of numba jit compilation were better than either writing the base code in cython or having each simulation take 5x slower in pure python/numpy. Tom |
Beta Was this translation helpful? Give feedback.
Hi I use numba jit compilation to speed up the simulation and for that it needs to compile the model functions on the first run through. In the aquacrop init.py I run a test simulation so that this compilation occurs when the user first imports the module rather than when they run their first simulation.
Although not ideal I decided the trade offs of numba jit compilation were better than either writing the base code in cython or having each simulation take 5x slower in pure python/numpy.
Tom