Inline self._pop_node and self._push_node These are still separate functions, but rather than using self._a_stack.append we assign a local variable a_stack_append, and call it directly. This drops the merge_sort() time down to approx 385ms-400ms With that large of a speed-up it seems worth the loss in readability. (This is almost 50% of the original time)