summaryrefslogtreecommitdiff
path: root/src/string.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-02-06 21:57:17 +1100
committerMaxime Coste <mawww@kakoune.org>2024-02-06 21:57:17 +1100
commit04a96b059faac8100a291e56bfbdb1962d53d4e1 (patch)
tree82191cd45870634637c4a7ee0f437d5fd52111e3 /src/string.hh
parent53d9b9b67650a2b34345d9153bef2a01cb75c418 (diff)
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.
Diffstat (limited to 'src/string.hh')
-rw-r--r--src/string.hh2
1 files changed, 1 insertions, 1 deletions
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*;