nizhikov commented on code in PR #12635:
URL: https://github.com/apache/ignite/pull/12635#discussion_r2693265012
##########
modules/binary/api/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java:
##########
@@ -3057,6 +3057,16 @@ public static BinaryMetadata binaryMetadata(
return new BinaryMetadata(typeId, typeName, fields, affKeyFieldName,
schemas, isEnum, enumMap);
}
+ /** */
+ public static int hashCode(byte[] data, int startPos, int endPos) {
+ int hash = 1;
+
+ for (int i = startPos; i < endPos; i++)
+ hash = 31 * hash + data[i];
Review Comment:
It can be hot code path.
Don't think additional checks will help.
But it can damage performance.
I tend to not change existing code without strong reason.
--
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]