Eliminate a branch in FastBitVector setAndCheck, make it vectorizable.
[WebKit-https.git] / Source / WTF / wtf / FastBitVector.h
index dfefb0739a5b4cfc7556fdc79c67b57190b5c960..8c8f3d216b8656f452d8af9f70448af687fb88b3 100644 (file)
@@ -101,10 +101,8 @@ public:
         bool changed = false;
         ASSERT(m_numBits == other.m_numBits);
         for (unsigned i = arrayLength(); i--;) {
-            if (m_array[i] == other.m_array[i])
-                continue;
+            changed |= m_array[i] != other.m_array[i];
             m_array[i] = other.m_array[i];
-            changed = true;
         }
         return changed;
     }