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 && self.values.get_unchecked(g).is_eq(key)` (i.e. avoiding the fetch 
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: [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