You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Above the _get_water_weight_array() function there's commented out code specifying the expected input types in the @njit decorator.
As far as I understand it, adding the types does not speed up the actual computations, but it does speed up the actual just-in-time compilation. So instead of the first timestep taking 30 seconds, and then the next ones taking 1 second, the first could be reduced to ~5 seconds if the types are specified.
This is nice, but it is definitely a confusing and intimidating block of code for someone new to python/numba who may want to implement their own methods/functions or modify our own. I think it's something to consider, and with the appropriate documentation, may be worthwhile.
The text was updated successfully, but these errors were encountered:
As far as I understand it, adding the types does not speed up the actual computations, but it does speed up the actual just-in-time compilation. So instead of the first timestep taking 30 seconds, and then the next ones taking 1 second, the first could be reduced to ~5 seconds if the types are specified.
This is nice, but it is definitely a confusing and intimidating block of code for someone new to python/numba who may want to implement their own methods/functions or modify our own. I think it's something to consider, and with the appropriate documentation, may be worthwhile.
The text was updated successfully, but these errors were encountered: