You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/30 06:23:32 UTC

[GitHub] [spark] sunchao commented on a change in pull request #32407: [SPARK-35261][SQL] Support static magic method for stateless ScalarFunction

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



##########
File path: sql/core/benchmarks/FunctionBenchmark-jdk11-results.txt
##########
@@ -0,0 +1,32 @@
+OpenJDK 64-Bit Server VM 11.0.10+9-LTS on Mac OS X 10.16
+Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
+scalar function (long + long) -> long/notnull wholestage on:  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+-------------------------------------------------------------------------------------------------------------------------------------------
+with long_add_default                                                27292          29059        1913         18.3          54.6       1.0X
+with long_add_magic                                                   7049           7070          20         70.9          14.1       3.9X
+with long_add_static_magic                                            6752           6791          67         74.1          13.5       4.0X
+
+OpenJDK 64-Bit Server VM 11.0.10+9-LTS on Mac OS X 10.16
+Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
+scalar function (long + long) -> long/notnull wholestage off:  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+--------------------------------------------------------------------------------------------------------------------------------------------
+with long_add_default                                                 28601          28964         496         17.5          57.2       1.0X
+with long_add_magic                                                    6986           7156         150         71.6          14.0       4.1X
+with long_add_static_magic                                             6509           6539          32         76.8          13.0       4.4X
+
+OpenJDK 64-Bit Server VM 11.0.10+9-LTS on Mac OS X 10.16
+Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
+scalar function (long + long) -> long/nullable wholestage on:  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
+--------------------------------------------------------------------------------------------------------------------------------------------
+with long_add_default                                                 34579          34627          56         14.5          69.2       1.0X
+with long_add_magic                                                    6783           6799          17         73.7          13.6       5.1X
+with long_add_static_magic                                             7220           7476         332         69.3          14.4       4.8X

Review comment:
       This may due to `StaticInvoke` adds boxing even for primitive return types. Will look into it.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org