Hello,

We have a need to quickly compare buffers to see if they are identical and 
it often can occur that their size will be ==.

In our benchmarks we noted that Arrays.equals() is much faster due to 
vectorization, but we understand that there might be some dangers comparing 
the underlying arrays? We are aware that not all bytebuffs are array 
backed, but in our case we compare only UnpooledUnsafeHeapByteBuf.

How dangerous would it be to use Arrays.equals? Are there better ways to 
compare buffers staying within safe realm?

Regards

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/29a59b72-725b-4363-9ea2-7774f53ade00n%40googlegroups.com.

Reply via email to