Github user gatorsmile commented on the pull request:
https://github.com/apache/spark/pull/10335#issuecomment-165677421
RDD range API with `count` (workload **1,000,000,000** rows):
```
scala> val startTime = System.currentTimeMillis; sc.range(0, 1000000000, 1,
15).count(); val endTime = System.currentTimeMillis; val start = new
Timestamp(startTime); val end = new Timestamp(endTime); val elapsed = (endTime
- startTime)/ 1000.0
startTime: Long = 1450416352767
endTime: Long = 1450416353302
start: java.sql.Timestamp = 2015-12-17 21:25:52.767
end: java.sql.Timestamp = 2015-12-17 21:25:53.302
elapsed: Double = 0.535
scala> val startTime = System.currentTimeMillis; sc.range(0, 1000000000, 1,
15).count(); val endTime = System.currentTimeMillis; val start = new
Timestamp(startTime); val end = new Timestamp(endTime); val elapsed = (endTime
- startTime)/ 1000.0
startTime: Long = 1450416354143
endTime: Long = 1450416354673
start: java.sql.Timestamp = 2015-12-17 21:25:54.143
end: java.sql.Timestamp = 2015-12-17 21:25:54.673
elapsed: Double = 0.53
scala> val startTime = System.currentTimeMillis; sc.range(0, 1000000000, 1,
15).count(); val endTime = System.currentTimeMillis; val start = new
Timestamp(startTime); val end = new Timestamp(endTime); val elapsed = (endTime
- startTime)/ 1000.0
startTime: Long = 1450416355390
endTime: Long = 1450416355936
start: java.sql.Timestamp = 2015-12-17 21:25:55.39
end: java.sql.Timestamp = 2015-12-17 21:25:55.936
elapsed: Double = 0.546
```
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]