sizespectrum / mizer

Multi-species size-based ecological modelling in R
https://sizespectrum.org/mizer
38 stars 43 forks source link

Speed up inner loop #278

Open gustavdelius opened 1 year ago

gustavdelius commented 1 year ago

We can easily speed up the inner loop over size classes at

https://github.com/sizespectrum/mizer/blob/420fca74da0d31134415b9e71dbd2bb18ea76054/src/inner_project_loop.cpp#LL11-L13

by only running up the size class of the maximum size of the species. We only need to add a w_max_idx vector argument to inner_project_loop() and can then get rid of the no_w argument.