notfilippo commented on code in PR #396:
URL: https://github.com/apache/datasketches-rust/pull/396#discussion_r4643232958


##########
datasketches/src/hash/murmurhash.rs:
##########
@@ -110,6 +105,51 @@ impl MurmurHash3X64128 {
         self.h2 = self.h2.wrapping_add(self.h1);
         self.h2 = self.h2.wrapping_mul(5).wrapping_add(0x38495ab5);
     }
+
+    #[inline(always)]
+    fn write_fixed<const N: usize>(&mut self, bytes: [u8; N]) {
+        debug_assert!(N <= 16);
+        if N == 16 && self.buf_len == 0 {
+            self.total = self.total.wrapping_add(16);
+            self.update(read_u64_le(&bytes[..8]), read_u64_le(&bytes[8..]));
+        } else if self.buf_len + N < 16 {

Review Comment:
   I was looking for keys that would regress with this change and I found 
`(u64, u64)`
   
   | `(u64, u64)` workload | `main` | #396 |
   |---|---:|---:|
   | `Coupon::from_value((a, b))` | 306 ms | 522 ms |
   | Build an HLL8 sketch with `update((a, b))` | 311 ms | 417 ms |
   
   Could we add a `(u64, u64)` case alongside the single-`u64` benchmark and 
see if we can keep the byte-slice gains without slowing down two-field keys?



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