Commit ef515e22 authored by Thibault Allançon's avatar Thibault Allançon

mc: bloom_filter: use function pointer instead of std::function

Avoid std::function overhead in performance.

* spot/mc/bloom_filter.hh: implementation here.
parent 04b98c2b
Pipeline #17819 failed with stage
in 58 minutes and 6 seconds
......@@ -22,7 +22,6 @@
#include <spot/misc/hashfunc.hh>
#include <atomic>
#include <functional>
/* Lock-free concurrent Bloom Filter implementation */
......@@ -58,7 +57,7 @@ namespace spot
public:
using hash_t = size_t;
using hash_function_t = std::function<hash_t(hash_t)>;
using hash_function_t = hash_t (*)(hash_t);
using hash_functions_t = std::vector<hash_function_t>;
concurrent_bloom_filter(size_t mem_size, hash_functions_t hash_functions)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment