diff --git a/src/storm/storage/BitVector.cpp b/src/storm/storage/BitVector.cpp index 97b1945e6..60fdf166b 100644 --- a/src/storm/storage/BitVector.cpp +++ b/src/storm/storage/BitVector.cpp @@ -1001,13 +1001,15 @@ namespace storm { std::size_t FNV1aBitVectorHash::operator()(storm::storage::BitVector const& bv) const { std::size_t seed = 14695981039346656037ull; - uint64_t prime = 1099511628211ull; unsigned char const* it = reinterpret_cast(bv.buckets); unsigned char const* ite = it + 8 * bv.bucketCount(); - for (; it != ite; ++it) { - seed = (*it ^ seed) * prime; + while (it < ite) { + seed ^= *it++; + + // Multiplication with magic prime. + seed += (seed << 1) + (seed << 4) + (seed << 5) + (seed << 7) + (seed << 8) + (seed << 40); } return seed;