I am trying to understand the Timsort algorithm, but I am having trouble implementing the stack invariant:
According to this document,
We would like to restrain the merge as long as possible in order to use patterns that may arise later, but we like to make the merge as quickly as possible in order to use the fact that the just found start is still high in the memory hierarchy.
I understand that we want to merge as soon as possible in order to use the cache effect, but I do not understand the reason why we want to postpone it. What โpatternsโ does he mean by this?
source share