tisonkun commented on code in PR #190:
URL: https://github.com/apache/datasketches-rust/pull/190#discussion_r3746028856


##########
datasketches/src/bloom/sketch.rs:
##########
@@ -477,17 +477,16 @@ impl BloomFilter {
                     .map_err(insufficient_data("bit_array"))?;
             }
 
-            // Handle "dirty" state: 0xFFFFFFFFFFFFFFFF indicates bits need 
recounting
+            let counted_bits_set = bit_array.iter().map(|word| 
word.count_ones() as u64).sum();
+

Review Comment:
   Good point. I folded the population count into the word-reading loop, 
preserving the dirty-sentinel and mismatch-validation behavior while avoiding 
the second traversal.



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