Closed travis-madhive closed 4 years ago
I believe "boxing" here does not refer to the Java autoboxing (e.g. int -> Integer). It means that caller of add()
can call this function directly if they have a byte[]
ready, instead of calling add(Object)
which they have to box byte[]
into ByteString
.
Ah, I see. Okay, thanks for the quick response!
Is this optimization valid? If I understand correctly, Java arrays are objects, and therefore wouldn't be boxed.
https://github.com/google/zetasketch/blob/a2f2692fae8cf61103330f9f70e696c4ba8b94b0/java/com/google/zetasketch/HyperLogLogPlusPlus.java#L188-L197