Use flat_hash_map for source location payload map.

This commit is contained in:
Bartosz Taudul 2017-11-24 01:10:12 +01:00
parent 7a13892754
commit f2a19c4593
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#include <string.h>
#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

View File

@ -189,7 +189,7 @@ private:
std::unordered_map<const char*, uint32_t, charutil::Hasher, charutil::Comparator> m_stringMap;
Vector<SourceLocation*> m_sourceLocationPayload;
std::unordered_map<SourceLocation*, uint32_t, SourceLocationHasher, SourceLocationComparator> m_sourceLocationPayloadMap;
flat_hash_map<SourceLocation*, uint32_t, SourceLocationHasher, SourceLocationComparator> m_sourceLocationPayloadMap;
NonRecursiveBenaphore m_mbpslock;
std::vector<float> m_mbps;