heemod
heemod copied to clipboard
Reduce code bottlenecks
Bottlenecks significantly reduce the speed of iterative functions for heterogeneity and probabilistic analysis. They should be identified and improvements should be suggested.
Compiling functions with compiler::enableJIT()
actually slows down the code...
Biggest bottleneck: do_()
call in eval_matrix()
.
This was actually (partially) addressed in a recent update. Sped up the do_() call in eval_matrix by around 4x. Of course there is always more to do. It might be useful to reprofile the code.
I agree, thanks a lot for that! Furthermore bc84686d7aa4734c555a754e55be703805370660 added another 2x time speedup by running check_matrix()
only once on a 3-D array instead of repeating it over 2-D matrices.
I'll still keep this issue open though to track codes bottlenecks elsewhere in the code.
I suspect we could gain time in split_along_dim()
.
partially addressed by pull request #140.