From 04a96b059faac8100a291e56bfbdb1962d53d4e1 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 6 Feb 2024 21:57:17 +1100 Subject: Use different hash algorithms for strings and file hashing For hash map, using fnv1a is faster as it is a much simpler algorithm we can afford to inline. For files murmur3 should win as it processes bytes 4 by 4. --- src/string.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string.hh') diff --git a/src/string.hh b/src/string.hh index b6b313a1..004be04c 100644 --- a/src/string.hh +++ b/src/string.hh @@ -21,7 +21,7 @@ public: friend constexpr size_t hash_value(const Type& str) { - return hash_data(str.data(), (int)str.length()); + return fnv1a(str.data(), (int)str.length()); } using iterator = CharType*; -- cgit v1.2.3