considering CPU, reduce loop as possible