panbingkun commented on PR #47984:
URL: https://github.com/apache/spark/pull/47984#issuecomment-2367578912

   If we `don't` use `Invoke` to implement `ToJavaArray`, the benchmark data is 
as follows (run 3 times):
   - box as `java.lang.Integer`
   
   
   - `java.lang.Object`
   ```shell
   Running benchmark: array binary search
     Running case: has foldable optimize
     Stopped after 100 iterations, 23226 ms
   
   OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 15.0
   Apple M2
   array binary search:                      Best Time(ms)   Avg Time(ms)   
Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   
------------------------------------------------------------------------------------------------------------------------
   has foldable optimize                               225            232       
    7         44.4          22.5       1.0X
   
   Running benchmark: array binary search
     Running case: has foldable optimize
     Stopped after 100 iterations, 23022 ms
   
   OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 15.0
   Apple M2
   array binary search:                      Best Time(ms)   Avg Time(ms)   
Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   
------------------------------------------------------------------------------------------------------------------------
   has foldable optimize                               223            230       
    8         44.8          22.3       1.0X
   
   Running benchmark: array binary search
     Running case: has foldable optimize
     Stopped after 100 iterations, 24869 ms
   
   OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 15.0
   Apple M2
   array binary search:                      Best Time(ms)   Avg Time(ms)   
Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   
------------------------------------------------------------------------------------------------------------------------
   has foldable optimize                               242            249       
   10         41.4          24.2       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