[core] Switch to ankerl::unordered_dense

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-11-24 17:34:56 +00:00
parent 03132c6877
commit ef6522ed28
282 changed files with 4386 additions and 1456 deletions

View File

@@ -5,9 +5,10 @@
#include <queue>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
#include "3party/ankerl/unordered_dense.h"
namespace base
{
@@ -79,7 +80,7 @@ public:
template <class Key>
class TopStatsCounter
{
std::unordered_map<Key, size_t> m_data;
ankerl::unordered_dense::map<Key, size_t> m_data;
public:
void Add(Key const & key) { ++m_data[key]; }
@@ -88,7 +89,7 @@ public:
{
ASSERT(count > 0, ());
using PtrT = std::pair<Key const, size_t> const *;
using PtrT = typename ankerl::unordered_dense::map<Key, size_t>::value_type const *;
struct GreaterNumber
{
bool operator()(PtrT l, PtrT r) const { return l->second > r->second; }