mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Use flat_hash_map for source location payload map.
This commit is contained in:
parent
7a13892754
commit
f2a19c4593
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user