diff --git a/include/opendht/infohash.h b/include/opendht/infohash.h
index d4f2c7e43ff48015a9070fe5ad0cff30a8c9635e..3811ea22dcc361bbf6ec06216694fce52261dff5 100644
--- a/include/opendht/infohash.h
+++ b/include/opendht/infohash.h
@@ -103,10 +103,7 @@ public:
     static constexpr inline Hash zero() noexcept { return Hash{}; }
 
     bool operator==(const Hash& h) const {
-        for (unsigned i=0; i < N; i++)
-            if (data_[i] != h.data_[i])
-                return false;
-        return true;
+        return data_ == h.data_;
     }
     bool operator!=(const Hash& h) const { return !(*this == h); }