Skip to content

Improve iterator performance by avoiding linear search

Corentin Noël requested to merge tapkey:iterator-performance-next_year into master

Created by: minichma

Recurrence iterators frequently search for the next set bit within icalrecur_iterator_impl.days bit field. This is currently done via a linear search, which contributes significantly to the overall computational efforts related to iterators, especially when working with yearly recurrences like in timezones. This PR improves the search algorithm by completely skipping words that don't have any bits set at all and doing a b-search otherwise.

Merge request reports