GitHub user cloud-fan opened a pull request:

    https://github.com/apache/spark/pull/736

    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloud-fan/spark master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/736.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #736
    
----
commit 1ebef72d8ea60a65645ad4c73ed03c9c41aa2c85
Author: Wenchen Fan(Cloud) <cloud0...@gmail.com>
Date:   2014-05-12T07:32:59Z

    use Iterator#size in RDD#count

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to