dcapwell commented on code in PR #4013:
URL: https://github.com/apache/cassandra/pull/4013#discussion_r2226407686


##########
src/java/org/apache/cassandra/utils/FastByteOperations.java:
##########
@@ -225,11 +229,20 @@ public int compare(ByteBuffer buffer1, int position1, int 
length1, byte[] buffer
         {
             Object obj1;
             long offset1;
+
+            // Heap ByteBuffer (Mutable)
             if (buffer1.hasArray())
             {
                 obj1 = buffer1.array();
                 offset1 = BYTE_ARRAY_BASE_OFFSET + buffer1.arrayOffset() + 
position1;
             }
+            // Read-Only Heap ByteBuffer (Still has hb but read-only)
+            else if (buffer1.isReadOnly() && !buffer1.isDirect())

Review Comment:
   given read only are not the common case, can we actually have the direct BB 
case first? 



-- 
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: pr-unsubscr...@cassandra.apache.org

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


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

Reply via email to