Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16391#discussion_r93789313
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DatasetBenchmark.scala ---
    @@ -170,36 +176,39 @@ object DatasetBenchmark {
         val benchmark3 = aggregate(spark, numRows)
     
         /*
    -    OpenJDK 64-Bit Server VM 1.8.0_91-b14 on Linux 
3.10.0-327.18.2.el7.x86_64
    -    Intel Xeon E3-12xx v2 (Ivy Bridge)
    +    Java HotSpot(TM) 64-Bit Server VM 1.8.0_60-b27 on Mac OS X 10.12.1
    +    Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
    +
         back-to-back map:                        Best/Avg Time(ms)    
Rate(M/s)   Per Row(ns)   Relative
         
------------------------------------------------------------------------------------------------
    -    RDD                                           3448 / 3646         29.0 
         34.5       1.0X
    -    DataFrame                                     2647 / 3116         37.8 
         26.5       1.3X
    -    Dataset                                       4781 / 5155         20.9 
         47.8       0.7X
    +    RDD                                           3963 / 3976         25.2 
         39.6       1.0X
    +    DataFrame                                      826 /  834        121.1 
          8.3       4.8X
    +    Dataset                                       5178 / 5198         19.3 
         51.8       0.8X
         */
         benchmark.run()
     
         /*
    -    OpenJDK 64-Bit Server VM 1.8.0_91-b14 on Linux 
3.10.0-327.18.2.el7.x86_64
    -    Intel Xeon E3-12xx v2 (Ivy Bridge)
    +    Java HotSpot(TM) 64-Bit Server VM 1.8.0_60-b27 on Mac OS X 10.12.1
    +    Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
    +
         back-to-back filter:                     Best/Avg Time(ms)    
Rate(M/s)   Per Row(ns)   Relative
         
------------------------------------------------------------------------------------------------
    -    RDD                                           1346 / 1618         74.3 
         13.5       1.0X
    -    DataFrame                                       59 /   72       1695.4 
          0.6      22.8X
    -    Dataset                                       2777 / 2805         36.0 
         27.8       0.5X
    +    RDD                                            533 /  587        187.6 
          5.3       1.0X
    +    DataFrame                                       79 /   91       1269.0 
          0.8       6.8X
    +    Dataset                                        550 /  559        181.7 
          5.5       1.0X
    --- End diff --
    
    For "back-to-back filter", `Dataset` will deserialize the input row to an 
object and apply the condition function. When the deserialization becomes 
no-op, `Dataset` runs almost the same RDD code like the `RDD` case. So in this 
case, `RDD` and `Dataset` has similar performance.


---
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]

Reply via email to