Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/1698#issuecomment-50849409
Your implementation calls `reduceByKey` and `cartesian`. Those are not
cheap streamline operations. `map(x => (1, x)).reduceByKey` is the same as
`reduce` except that it reduces to some executor instead of the driver. Then
`cartesian` is the same as `broadcast` but `broadcast` is more efficient with
TorrentBroadcast. You can compare the performance and see the difference.
`OnlineSummarizer` also uses a more accurate approach to compute the variance.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---