Skip to content

Time taken to import the library #8

Answered by thomasdkelly
husqD asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@husqD
Comment options

Answer selected by thomasdkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants