lewisfogden / heavylight

A lightweight actuarial modelling framework for Python
https://lewisfogden.github.io/heavylight/
MIT License
5 stars 2 forks source link

Memory optimization, not optimal #15

Closed MatthewCaseres closed 5 months ago

MatthewCaseres commented 5 months ago

Was seeing reductions in cache size of 80% when larger reductions > 99% were expected on the lifelib Term_ME model.

A cached function pols_new_biz that is calculated and cleared by another function expenses will still be called in the loop

    for t in range(proj_len+1):
        for func in model._single_param_timestep_funcs:
            func(t)
MatthewCaseres commented 5 months ago

fixed as of pr #16