sunchao commented on a change in pull request #32407:
URL: https://github.com/apache/spark/pull/32407#discussion_r627149016



##########
File path: sql/core/benchmarks/FunctionBenchmark-jdk11-results.txt
##########
@@ -0,0 +1,60 @@
+OpenJDK 64-Bit Server VM 11.0.11+9-LTS on Linux 5.4.0-1046-azure
+Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
+Java scalar function (long + long) -> long result_nullable = true codegen = 
true:  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   
Relative
+----------------------------------------------------------------------------------------------------------------------------------------------------------------
+with long_add_default                                                          
           52937          54250        1181          9.4         105.9       
1.0X
+with long_add_magic                                                            
           20527          20975         683         24.4          41.1       
2.6X
+with long_add_static_magic                                                     
           20513          20944         447         24.4          41.0       
2.6X

Review comment:
       If you look at the other results, such as JDK 8 when result is 
not-nullable, `long_add_static_magic` is 23% faster than `long_magic`, so IMO 
it's worthwhile to add this option. It's also just a simple extension on the 
current API.

##########
File path: sql/core/benchmarks/FunctionBenchmark-jdk11-results.txt
##########
@@ -0,0 +1,60 @@
+OpenJDK 64-Bit Server VM 11.0.11+9-LTS on Linux 5.4.0-1046-azure
+Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
+Java scalar function (long + long) -> long result_nullable = true codegen = 
true:  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   
Relative
+----------------------------------------------------------------------------------------------------------------------------------------------------------------
+with long_add_default                                                          
           52937          54250        1181          9.4         105.9       
1.0X
+with long_add_magic                                                            
           20527          20975         683         24.4          41.1       
2.6X
+with long_add_static_magic                                                     
           20513          20944         447         24.4          41.0       
2.6X

Review comment:
       If you look at the other results, such as JDK 8 when result is 
not-nullable, `long_add_static_magic` is 23% faster than `long_add_magic`, so 
IMO it's worthwhile to add this option. It's also just a simple extension on 
the current API.




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

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