We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a03d0fc commit 92a0d1bCopy full SHA for 92a0d1b
src/metrics.h
@@ -109,8 +109,15 @@ class Rate
109
};
110
111
struct IPv4Hash {
112
- size_t operator()(uint32_t k) {
113
- return pcpp::fnv_hash((uint8_t*)&k, sizeof(k));
+ size_t operator()(long long key) {
+ // This hash function is taken from the internals of Austin Appleby's MurmurHash3 algorithm
114
+ // see https://github.com/apache/incubator-datasketches-characterization/blob/master/cpp/src/frequent_items_sketch_timing_profile.cpp
115
+ key ^= key >> 33;
116
+ key *= 0xff51afd7ed558ccdL;
117
118
+ key *= 0xc4ceb9fe1a85ec53L;
119
120
+ return key;
121
}
122
123
0 commit comments