From f2a19c4593a526472fb1835a2a15540532661612 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 24 Nov 2017 01:10:12 +0100 Subject: [PATCH] Use flat_hash_map for source location payload map. --- server/TracyEvent.hpp | 2 ++ server/TracyView.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index 94deb12c..98e9e226 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -5,6 +5,7 @@ #include #include "TracyVector.hpp" +#include "tracy_flat_hash_map.hpp" namespace tracy { @@ -210,6 +211,7 @@ struct SourceLocationHasher { return charutil::hash( (const char*)ptr, sizeof( SourceLocation ) ); } + typedef tracy::power_of_two_hash_policy hash_policy; }; struct SourceLocationComparator diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 1e0ab32f..40a43c49 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -189,7 +189,7 @@ private: std::unordered_map m_stringMap; Vector m_sourceLocationPayload; - std::unordered_map m_sourceLocationPayloadMap; + flat_hash_map m_sourceLocationPayloadMap; NonRecursiveBenaphore m_mbpslock; std::vector m_mbps;