ulysses-you commented on a change in pull request #34310:
URL: https://github.com/apache/spark/pull/34310#discussion_r735087285



##########
File path: sql/core/benchmarks/ByteArrayBenchmark-results.txt
##########
@@ -0,0 +1,16 @@
+================================================================================================

Review comment:
       I compared the two code path within one 
[patch](https://github.com/ulysses-you/spark/blob/benchmark-test/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/ByteArrayBenchmark.scala),
 and here is the  result.
   
   [JDK8](https://github.com/ulysses-you/spark/actions/runs/1377336453):
   ```
   
================================================================================================
   byte array comparisons
   
================================================================================================
   
   OpenJDK 64-Bit Server VM 1.8.0_312-b07 on Linux 5.8.0-1042-azure
   Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
   Byte Array compare offHeap:               Best Time(ms)   Avg Time(ms)   
Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   
------------------------------------------------------------------------------------------------------------------------
   2-7 byte                                            636            661       
   14        103.0           9.7       1.0X
   8-16 byte                                          1067           1112       
   21         61.4          16.3       0.6X
   16-32 byte                                         1226           1352       
   98         53.4          18.7       0.5X
   512-1024 byte                                      1803           1916       
   46         36.3          27.5       0.4X
   512 byte slow                                      4343           4662       
  171         15.1          66.3       0.1X
   2-7 byte                                           1075           1119       
   26         61.0          16.4       0.6X
   
   OpenJDK 64-Bit Server VM 1.8.0_312-b07 on Linux 5.8.0-1042-azure
   Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
   Byte Array compare onHeap:                Best Time(ms)   Avg Time(ms)   
Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   
------------------------------------------------------------------------------------------------------------------------
   2-7 byte                                           1511           1570       
   30         43.4          23.1       1.0X
   8-16 byte                                          1522           1564       
   27         43.1          23.2       1.0X
   16-32 byte                                         1426           1554       
   36         46.0          21.8       1.1X
   512-1024 byte                                      2080           2198       
   86         31.5          31.7       0.7X
   512 byte slow                                     28498          29222       
  410          2.3         434.9       0.1X
   2-7 byte                                           1382           1485       
   61         47.4          21.1       1.1X
   ```
   
   [JDK11](https://github.com/ulysses-you/spark/actions/runs/1377337612)
   ```
   
================================================================================================
   byte array comparisons
   
================================================================================================
   
   OpenJDK 64-Bit Server VM 11.0.13+8-LTS on Linux 5.8.0-1042-azure
   Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
   Byte Array compare offHeap:               Best Time(ms)   Avg Time(ms)   
Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   
------------------------------------------------------------------------------------------------------------------------
   2-7 byte                                            720            777       
   21         91.0          11.0       1.0X
   8-16 byte                                          1077           1138       
   32         60.8          16.4       0.7X
   16-32 byte                                         1347           1463       
   84         48.7          20.5       0.5X
   512-1024 byte                                      1898           1989       
   40         34.5          29.0       0.4X
   512 byte slow                                      4621           4878       
  168         14.2          70.5       0.2X
   2-7 byte                                           1062           1133       
   28         61.7          16.2       0.7X
   
   OpenJDK 64-Bit Server VM 11.0.13+8-LTS on Linux 5.8.0-1042-azure
   Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
   Byte Array compare onHeap:                Best Time(ms)   Avg Time(ms)   
Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   
------------------------------------------------------------------------------------------------------------------------
   2-7 byte                                           1377           1471       
   37         47.6          21.0       1.0X
   8-16 byte                                          1398           1475       
   38         46.9          21.3       1.0X
   16-32 byte                                         1452           1547       
   47         45.2          22.1       0.9X
   512-1024 byte                                      1826           1953       
   55         35.9          27.9       0.8X
   512 byte slow                                     45883          47146       
  NaN          1.4         700.1       0.0X
   2-7 byte                                           1401           1484       
   39         46.8          21.4       1.0X
   
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to