Sort arrays by period before iterating them when computing an holder.