cyb70289 commented on pull request #12338:
URL: https://github.com/apache/arrow/pull/12338#issuecomment-1040064039


   Thanks @rtpsw !
   
   I suggest we first create a solid benchmark for `max_element_wise` before 
optimizing it. Adhoc benchmark is hard to get right.
   E.g., for the benchmark code in [jira 
comment](https://issues.apache.org/jira/browse/ARROW-15571?focusedCommentId=17487559&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17487559),
 on my test machine, the speed ratio is 1.4 to 3.7. But if I swap the order 
(call `maximum` before `max_element_wise`, t0 is still `max_element_wise`, t1 
is stil `maximum`), the speed ratio becomes 0.3 to 0.8 (slower). After some 
refinement it gives about 20% improvement, which looks reasonable.
   
   Another reason is it duplicates `max_element_wise`, but with much fewer data 
types supported. I think it's better to augment existing kernel than inventing 
a new one.
   cc @lidavidm for comments.


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


Reply via email to