Dandandan commented on code in PR #16136:
URL: https://github.com/apache/datafusion/pull/16136#discussion_r2100764581


##########
datafusion/physical-plan/src/aggregates/group_values/single_group_by/primitive/mod.rs:
##########
@@ -130,15 +133,15 @@ where
                     let hash = key.hash(state);
                     let insert = self.map.entry(
                         hash,
-                        |&(g, _)| unsafe { 
self.values.get_unchecked(g).is_eq(key) },

Review Comment:
   I wonder if the existing performance couldn't already be improved by doing 
`h == hash && unsafe { self.values.get_unchecked(g).is_eq(key) }` (i.e. 
avoiding fetching the value if hash equality doesn't hold), like we do in other 
places. This already filters out most of them as hashes are almost never the 
same.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to