From c96211f0518dd07cc8fc33140bc9be475a205743 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Mon, 4 Jun 2018 12:50:49 +0200 Subject: [PATCH] common/performance: Now hobject_t's hash no longer depends directly on oid. Signed-off-by: Adam Kupczyk (cherry picked from commit c14504c157d3d6a8eecddaf6c83280ee254c069d) --- src/common/hobject.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/common/hobject.h b/src/common/hobject.h index 09aefd16fded..24eeb9754e2f 100644 --- a/src/common/hobject.h +++ b/src/common/hobject.h @@ -300,13 +300,8 @@ WRITE_CLASS_ENCODER(hobject_t) namespace std { template<> struct hash { size_t operator()(const hobject_t &r) const { - static std::hash H; static rjhash RJ; - size_t hash; - hash = H(r.oid); - hash = RJ(hash ^ r.get_hash()); - hash = RJ(hash ^ r.snap); - return hash; + return RJ(r.get_hash() ^ r.snap); } }; } // namespace std -- 2.47.3