Performance benefit for minimizing allocations not large enough to justify added complexity to codebase. Implementation in JuliaActuary found to be fast, despite creation of many small arrays.
Recommended implementation pattern is get_interval_starts_dynamic2 from the gist.
Task resolved with the following gist - https://gist.github.com/MatthewCaseres/37e793b1777dd37223e54905e13d6989
Performance benefit for minimizing allocations not large enough to justify added complexity to codebase. Implementation in JuliaActuary found to be fast, despite creation of many small arrays.
Recommended implementation pattern is
get_interval_starts_dynamic2
from the gist.Time taken 10 hours.