Common::unordered_map/set defaulted to std::hash, a byte-wise FNV-1a on MSVC for integers and pointers, which boost's flat containers then mix again: the GPU thread's page maps (shader and query cache invalidation, per inline upload) spent ~1% in it. Integer and pointer keys now go through as they are and boost mixes them. BufferCache::IsRegionGpuModified visited every GPU-written range inside the query just to answer yes or no; without per-fence downloads those ranges stay fragmented and it was ~4% of title 1's GPU thread (inline uploads). RangeSet::Intersects answers with one lookup. Inline uploads: 10.5% -> 7.5% of the GPU thread.
16 lines
453 B
C++
16 lines
453 B
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "common/container_hash.h"
|
|
|
|
#include <boost/unordered/unordered_flat_set.hpp>
|
|
|
|
namespace Common {
|
|
|
|
template <class Key, class Hash = FastHash<Key>, class Pred = std::equal_to<Key>,
|
|
class Allocator = std::allocator<Key>>
|
|
using unordered_set = boost::unordered::unordered_flat_set<Key, Hash, Pred, Allocator>;
|
|
|
|
}
|