Thanks nhuurre for the suggestion. That’s interesting because I already tried the trick exp(n*log(x)) in the bigger version of my model, as I discussed in this thread, and this seemed to make the code slower than looping. Surprisingly, when I try the trick in the simple model above the model runs in only 12 s! It’s amazing the large effect small changes can have, and such effect can be different depending on the model.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Reduce_sum performance | 15 | 1333 | September 28, 2020 | |
Reduce_sum results in much slower run times, even for large datasets | 6 | 1322 | March 17, 2022 | |
Multilevel hurdle model -- no performance increase with reduce_sum() | 5 | 534 | September 12, 2021 | |
Understanding reduce_sum efficiency | 10 | 836 | March 22, 2021 | |
Reduce_sum() no time saving for multilevel model | 1 | 442 | December 24, 2020 |