Skip to content

Review hash_string_view hybrid hashing (FNV-1a + XXH3-64) #50

@Sherif-MoOo

Description

@Sherif-MoOo

Context
The current hash_string_view implementation uses a hybrid strategy:
– at compile-time (std::is_constant_evaluated() == true) it falls back to a
constexpr FNV-1a + Murmur final-mix;
– at run-time it delegates to xxh3_64bits_withSeed().

Concerns
Digest mismatch across translation units
Two identical keys may hash to different 64-bit values depending on whether
the call happened in a constexpr context, causing UB in distributed /
persisted maps.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions