You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2020/04/27 23:20:54 UTC

[incubator-datasketches-characterization] 01/01: call fmix64 from murmur3 instead of copying the code here

This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch fi_fmix64
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git

commit 8d110815e82d84d4a237af47bcdced721aa3f43d
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Mon Apr 27 16:20:35 2020 -0700

    call fmix64 from murmur3 instead of copying the code here
---
 cpp/src/frequent_items_sketch_timing_profile.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/cpp/src/frequent_items_sketch_timing_profile.cpp b/cpp/src/frequent_items_sketch_timing_profile.cpp
index 87ae013..853a8c3 100644
--- a/cpp/src/frequent_items_sketch_timing_profile.cpp
+++ b/cpp/src/frequent_items_sketch_timing_profile.cpp
@@ -33,12 +33,7 @@ namespace datasketches {
 // This hash function is taken from the internals of Austin Appleby's MurmurHash3 algorithm
 struct hash_long_long {
   size_t operator()(long long key) const {
-    key ^= key >> 33;
-    key *= 0xff51afd7ed558ccdL;
-    key ^= key >> 33;
-    key *= 0xc4ceb9fe1a85ec53L;
-    key ^= key >> 33;
-    return key;
+    return fmix64(key);
   }
 };
 typedef frequent_items_sketch<long long, long, hash_long_long> frequent_longs_sketch;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org