actuarialopensource / benchmarks

Some performance tests for actuarial applications
MIT License
14 stars 4 forks source link

Seriatim lifelib model #48

Closed MatthewCaseres closed 3 months ago

MatthewCaseres commented 11 months ago

Seems important based on discussion from here - https://modelx.io/blog/2023/08/19/enhanced-speed-for-exported-lifelib-models/

serenity4 commented 11 months ago

I think this should be done in conjunction with #41, as mentioned in the article there is a large speedup for exported Seriatim models w.r.t. non-exported Seriatim models. Otherwise, it wouldn't really be a fair benchmark.

MatthewCaseres commented 11 months ago

Yep totally agree. Makes most sense to resolve these issues together.

MatthewCaseres commented 3 months ago

This issue is being closed because NumPy does calculate the seriatim values and provides a nice syntax for aggregating them as well. Function call overhead is too high and vectorization is not available either with seriatim methods that cache single values at a time instead of arrays.

It does allow for complex control flow, but that is not currently a requirement to correctly calculate any of the numbers that we currently are calculating.