Jason918 commented on code in PR #18042:
URL: https://github.com/apache/pulsar/pull/18042#discussion_r996390904
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/BitSetRecyclable.java:
##########
@@ -105,6 +105,35 @@ private void recalculateWordsInUse() {
wordsInUse = i+1; // The new logical size
}
+ public int compareTo(BitSetRecyclable bitSetRecyclable) {
+ long[] words1 = toLongArray();
Review Comment:
I suggest we avoid this memory copy in `toLongArray`, just use `words` and
`wordsInUse` instead.
--
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]