chaokunyang commented on code in PR #1650:
URL: https://github.com/apache/incubator-fury/pull/1650#discussion_r1618894899


##########
java/fury-core/src/main/java/org/apache/fury/memory/MemoryBuffer.java:
##########
@@ -1774,7 +1774,7 @@ private long readVarUint36Slow() {
   /** Reads the 1-5 byte int part of a non-negative varint. */
   public int readVarUint32() {
     int readIdx = readerIndex;
-    if (size - readIdx < 5) {
+    if (size - readIdx < 4) {

Review Comment:
   The readVarUint36Slow is very rare, only last five bytes of the whole binary 
will go to this path. So we try to reduce the check in critical path



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