Speed up iter_by_timepoints