diff --git a/ConflictSet.cpp b/ConflictSet.cpp index f0aa31f..3a75b45 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1823,9 +1823,21 @@ bool scan16(const InternalVersionT *vs, const uint8_t *is, int begin, int end, indices, _mm_max_epu8(indices, _mm_set1_epi8(end - begin)))); uint32_t compared = 0; +#if INTERNAL_VERSION_32_BIT + __m128i w4[4]; + memcpy(w4, vs, sizeof(w4)); + uint32_t rv; + memcpy(&rv, &readVersion, sizeof(rv)); + const auto rvVec = _mm_set1_epi32(rv); + const auto zero = _mm_setzero_si128(); + for (int i = 0; i < 4; ++i) { + compared |= _mm_movemask_ps(_mm_cmpgt_epi32(_mm_sub_epi32(w4[i], rvVec), zero)) << (i * 4); + } +#else for (int i = 0; i < 16; ++i) { compared |= (vs[i] > readVersion) << i; } +#endif return !(compared & mask); #else