valepakh commented on PR #7914:
URL: https://github.com/apache/ignite-3/pull/7914#issuecomment-4193066479

   > Anyone measured performance? like we did here #7932 ?
   
   The original issue was a large number of allocations generated by this 
method noticed in one of the traces when one of the objects appeared in the hot 
path.
   
   > It is not clear why the hashcode uses pattern `int hash = 31 + ....` 
everywhere? Should we use this pattern always? Why there are no comments in 
places where preserving compatibility is mandatory and the pattern was used?
   
   This pattern with starting 31 is to keep value identical to the 
`Objects.hash` implementation. Rather than going through each instance and 
trying to understand whether the compatibility should be preserved or not I 
just used the same pattern everywhere. It doesn't matter what the value is if 
it satisfies the contract and I don't think anyone closely examines the 
hashCode methods.


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