use reduce version to get loop time