apache/spark — pull request #736 by cloud-fan (2014-05-12 07:45:33+00:00)
Title: use Iterator#size in RDD#count

in RDD#count, we used while loop to get the size of Iterator because that Iterator#size used a for loop, which was slightly slower in that version of Scala. But for now, the current version of scala will translate the for loop in Iterator#size into `foreach`, which uses while loop to iterate the Iterator. So we can use Iterator#size directly now.