aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch26
-rw-r--r--CMakeLists.txt1
-rw-r--r--externals/CMakeLists.txt6
-rw-r--r--externals/cpmfile.json9
-rw-r--r--src/android/app/src/main/jni/game_metadata.cpp5
-rw-r--r--src/android/app/src/main/jni/native_input.cpp5
-rw-r--r--src/common/CMakeLists.txt2
-rw-r--r--src/common/fs/path_util.cpp8
-rw-r--r--src/common/host_memory.cpp6
-rw-r--r--src/common/input.h7
-rw-r--r--src/common/param_package.h7
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_64.h4
-rw-r--r--src/core/arm/nce/lru_cache.h6
-rw-r--r--src/core/arm/nce/patcher.h4
-rw-r--r--src/core/file_sys/vfs/vfs_layered.cpp9
-rw-r--r--src/core/hle/kernel/k_process.h6
-rw-r--r--src/core/hle/kernel/kernel.cpp8
-rw-r--r--src/core/hle/kernel/kernel.h4
-rw-r--r--src/core/hle/service/am/frontend/applet_web_browser_types.h6
-rw-r--r--src/core/hle/service/bcat/news/builtin_news.cpp4
-rw-r--r--src/core/hle/service/bcat/news/news_storage.h6
-rw-r--r--src/core/hle/service/caps/caps_manager.h7
-rw-r--r--src/core/hle/service/ldn/lan_discovery.h6
-rw-r--r--src/core/hle/service/lm/lm.cpp6
-rw-r--r--src/core/hle/service/nifm/nifm.cpp4
-rw-r--r--src/core/hle/service/nvdrv/core/container.h5
-rw-r--r--src/core/hle/service/nvdrv/core/nvmap.h7
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h6
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.h4
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h7
-rw-r--r--src/core/hle/service/nvdrv/devices/nvmap.h7
-rw-r--r--src/core/hle/service/nvdrv/nvdrv.h9
-rw-r--r--src/core/hle/service/nvnflinger/hos_binder_driver_server.h9
-rw-r--r--src/core/hle/service/olsc/daemon_controller.h10
-rw-r--r--src/core/hle/service/sm/sm.h8
-rw-r--r--src/core/hle/service/vi/conductor.h7
-rw-r--r--src/core/launch_timestamp_cache.cpp6
-rw-r--r--src/dynarmic/CMakeLists.txt1
-rw-r--r--src/dynarmic/src/dynarmic/CMakeLists.txt18
-rw-r--r--src/dynarmic/tests/A64/fibonacci.cpp6
-rw-r--r--src/dynarmic/tests/A64/testenv.h6
-rw-r--r--src/hid_core/frontend/emulated_console.h7
-rw-r--r--src/hid_core/frontend/emulated_controller.h6
-rw-r--r--src/hid_core/frontend/emulated_devices.h7
-rw-r--r--src/input_common/drivers/android.h5
-rw-r--r--src/input_common/drivers/sdl_driver.cpp4
-rw-r--r--src/input_common/drivers/sdl_driver.h7
-rw-r--r--src/input_common/input_engine.h17
-rw-r--r--src/input_common/main.h11
-rw-r--r--src/shader_recompiler/environment.h8
-rw-r--r--src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp6
-rw-r--r--src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp14
-rw-r--r--src/shader_recompiler/ir_opt/texture_pass.cpp2
-rw-r--r--src/tests/common/fibers.cpp7
-rw-r--r--src/tests/video_core/memory_tracker.cpp4
-rw-r--r--src/video_core/buffer_cache/buffer_cache_base.h4
-rw-r--r--src/video_core/buffer_cache/memory_tracker_base.h4
-rw-r--r--src/video_core/control/channel_state_cache.h8
-rw-r--r--src/video_core/control/scheduler.h7
-rw-r--r--src/video_core/engines/maxwell_3d.h4
-rw-r--r--src/video_core/engines/sw_blitter/converter.cpp6
-rw-r--r--src/video_core/gpu.cpp4
-rw-r--r--src/video_core/gpu_logging/gpu_logging.h4
-rw-r--r--[-rwxr-xr-x]src/video_core/host1x/codecs/decoder.h5
-rw-r--r--src/video_core/host1x/host1x.h12
-rw-r--r--src/video_core/macro.h8
-rw-r--r--src/video_core/query_cache.h8
-rw-r--r--src/video_core/query_cache/query_cache.h4
-rw-r--r--src/video_core/query_cache/query_cache_base.h9
-rw-r--r--src/video_core/renderer_opengl/gl_buffer_cache.h6
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.h9
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.h4
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.h9
-rw-r--r--src/video_core/renderer_vulkan/vk_query_cache.cpp8
-rw-r--r--src/video_core/renderer_vulkan/vk_render_pass_cache.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_render_pass_cache.h7
-rw-r--r--src/video_core/shader_cache.h8
-rw-r--r--src/video_core/shader_environment.h18
-rw-r--r--src/video_core/texture_cache/texture_cache.h10
-rw-r--r--src/video_core/texture_cache/texture_cache_base.h23
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp10
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h4
-rw-r--r--src/yuzu/compatibility_list.h7
-rw-r--r--src/yuzu/configuration/input_profiles.h6
-rw-r--r--src/yuzu/loading_screen.cpp5
-rw-r--r--src/yuzu/loading_screen.h7
-rw-r--r--src/yuzu/multiplayer/chat_room.h9
87 files changed, 368 insertions, 254 deletions
diff --git a/.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch b/.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch
new file mode 100644
index 0000000000..f7d7c7ebe2
--- /dev/null
+++ b/.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch
@@ -0,0 +1,26 @@
+From b3622608433c183ba868a1dc8dd9cf285eb3b916 Mon Sep 17 00:00:00 2001
+From: Dario Petrillo <dario.pk1@gmail.com>
+Date: Thu, 27 Nov 2025 23:12:38 +0100
+Subject: [PATCH] avoid extra memset when clearing an empty table
+
+---
+ include/ankerl/unordered_dense.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/include/ankerl/unordered_dense.h b/include/ankerl/unordered_dense.h
+index 0835342..4938212 100644
+--- a/include/ankerl/unordered_dense.h
++++ b/include/ankerl/unordered_dense.h
+@@ -1490,8 +1490,10 @@ class table : public std::conditional_t<is_map_v<T>, base_table_type_map<T>, bas
+ // modifiers //////////////////////////////////////////////////////////////
+
+ void clear() {
+- m_values.clear();
+- clear_buckets();
++ if (!empty()) {
++ m_values.clear();
++ clear_buckets();
++ }
+ }
+
+ auto insert(value_type const& value) -> std::pair<iterator, bool> {
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbe947c1bf..0568a49ec8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -576,6 +576,7 @@ add_subdirectory(externals)
# pass targets from externals
find_package(enet)
find_package(MbedTLS)
+find_package(unordered_dense REQUIRED)
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
find_package(xbyak)
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 980d8f668d..739cebe2e9 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -66,6 +66,9 @@ if (NOT TARGET LLVM::Demangle)
add_library(LLVM::Demangle ALIAS demangle)
endif()
+# unordered_dense
+AddJsonPackage(unordered-dense)
+
if (YUZU_STATIC_ROOM)
return()
endif()
@@ -244,9 +247,6 @@ if (ENABLE_WEB_SERVICE OR ENABLE_UPDATE_CHECKER)
AddJsonPackage(cpp-jwt)
endif()
-# unordered_dense
-AddJsonPackage(unordered-dense)
-
# FFMpeg
if (YUZU_USE_EXTERNAL_FFMPEG OR YUZU_USE_BUNDLED_FFMPEG)
add_subdirectory(ffmpeg)
diff --git a/externals/cpmfile.json b/externals/cpmfile.json
index 7c04e389e2..cb1cdf3e4a 100644
--- a/externals/cpmfile.json
+++ b/externals/cpmfile.json
@@ -91,10 +91,13 @@
"unordered-dense": {
"package": "unordered_dense",
"repo": "martinus/unordered_dense",
- "tag": "v%VERSION%",
- "hash": "b98b5d4d96f8e0081b184d6c4c1181fae4e41723b54bed4296717d7f417348b48fad0bbcc664cac142b8c8a47e95aa57c1eb1cf6caa855fd782fad3e3ab99e5e",
+ "sha": "7b55cab841",
+ "hash": "d2106f6640f6bfb81755e4b8bfb64982e46ec4a507cacdb38f940123212ccf35a20b43c70c6f01d7bfb8c246d1a16f7845d8052971949cea9def1475e3fa02c8",
"find_args": "CONFIG",
- "git_version": "4.8.1"
+ "bundled": true,
+ "patches": [
+ "0001-avoid-memset-when-clearing-an-empty-table.patch"
+ ]
},
"mbedtls": {
"package": "MbedTLS",
diff --git a/src/android/app/src/main/jni/game_metadata.cpp b/src/android/app/src/main/jni/game_metadata.cpp
index c33763b471..e9c03b6440 100644
--- a/src/android/app/src/main/jni/game_metadata.cpp
+++ b/src/android/app/src/main/jni/game_metadata.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -18,7 +21,7 @@ struct RomMetadata {
bool isHomebrew;
};
-std::unordered_map<std::string, RomMetadata> m_rom_metadata_cache;
+ankerl::unordered_dense::map<std::string, RomMetadata> m_rom_metadata_cache;
RomMetadata CacheRomMetadata(const std::string& path) {
const auto file =
diff --git a/src/android/app/src/main/jni/native_input.cpp b/src/android/app/src/main/jni/native_input.cpp
index 5b69826c75..730d4f0a27 100644
--- a/src/android/app/src/main/jni/native_input.cpp
+++ b/src/android/app/src/main/jni/native_input.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -18,7 +21,7 @@
#include "input_common/drivers/virtual_gamepad.h"
#include "native.h"
-std::unordered_map<std::string, std::unique_ptr<AndroidConfig>> map_profiles;
+ankerl::unordered_dense::map<std::string, std::unique_ptr<AndroidConfig>> map_profiles;
bool IsHandheldOnly() {
const auto npad_style_set =
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 042f5c7bd9..58d2b2279e 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -253,7 +253,7 @@ if (lz4_ADDED)
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
endif()
-target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads)
+target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads unordered_dense::unordered_dense)
target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle zstd::zstd)
if(ANDROID)
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp
index 9b57fda295..3f928ac327 100644
--- a/src/common/fs/path_util.cpp
+++ b/src/common/fs/path_util.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -7,7 +7,7 @@
#include <algorithm>
#include <iostream>
#include <sstream>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/assert.h"
#include "common/fs/fs.h"
@@ -193,8 +193,8 @@ private:
SetLegacyPathImpl(legacy_path, new_path);
}
- std::unordered_map<EdenPath, fs::path> eden_paths;
- std::unordered_map<EmuPath, fs::path> legacy_paths;
+ ankerl::unordered_dense::map<EdenPath, fs::path> eden_paths;
+ ankerl::unordered_dense::map<EmuPath, fs::path> legacy_paths;
};
bool ValidatePath(const fs::path& path) {
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp
index 51ee0d333b..a1e99a4c9d 100644
--- a/src/common/host_memory.cpp
+++ b/src/common/host_memory.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -7,7 +7,7 @@
#ifdef _WIN32
#include <iterator>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <boost/icl/separate_interval_set.hpp>
#include <windows.h>
#include "common/dynamic_library.h"
@@ -391,7 +391,7 @@ private:
std::mutex placeholder_mutex; ///< Mutex for placeholders
boost::icl::separate_interval_set<size_t> placeholders; ///< Mapped placeholders
- std::unordered_map<size_t, size_t> placeholder_host_pointers; ///< Placeholder backing offset
+ ankerl::unordered_dense::map<size_t, size_t> placeholder_host_pointers; ///< Placeholder backing offset
};
#else // ^^^ Windows ^^^ vvv POSIX vvv
diff --git a/src/common/input.h b/src/common/input.h
index 2c4ccea22e..b076fd7e6b 100644
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -6,7 +9,7 @@
#include <functional>
#include <memory>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include <vector>
#include "common/logging/log.h"
@@ -409,7 +412,7 @@ public:
namespace Impl {
template <typename InputDeviceType>
-using FactoryListType = std::unordered_map<std::string, std::shared_ptr<Factory<InputDeviceType>>>;
+using FactoryListType = ankerl::unordered_dense::map<std::string, std::shared_ptr<Factory<InputDeviceType>>>;
template <typename InputDeviceType>
struct FactoryList {
diff --git a/src/common/param_package.h b/src/common/param_package.h
index d7c13cb1fc..0216863a39 100644
--- a/src/common/param_package.h
+++ b/src/common/param_package.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -5,14 +8,14 @@
#include <initializer_list>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
namespace Common {
/// A string-based key-value container supporting serializing to and deserializing from a string
class ParamPackage {
public:
- using DataType = std::unordered_map<std::string, std::string>;
+ using DataType = ankerl::unordered_dense::map<std::string, std::string>;
ParamPackage() = default;
explicit ParamPackage(const std::string& serialized);
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.h b/src/core/arm/dynarmic/arm_dynarmic_64.h
index 2ea1505ce7..07f6bb9449 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_64.h
+++ b/src/core/arm/dynarmic/arm_dynarmic_64.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -8,7 +8,7 @@
#include <atomic>
#include <memory>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <dynarmic/interface/A64/a64.h>
#include "common/common_types.h"
diff --git a/src/core/arm/nce/lru_cache.h b/src/core/arm/nce/lru_cache.h
index 1bc00c8f14..947b66f675 100644
--- a/src/core/arm/nce/lru_cache.h
+++ b/src/core/arm/nce/lru_cache.h
@@ -1,11 +1,11 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <list>
#include <optional>
#include <shared_mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include "common/logging/log.h"
@@ -144,7 +144,7 @@ private:
using list_type = std::list<key_type>;
using list_iterator = typename list_type::iterator;
using map_value_type = std::pair<list_iterator, value_type>;
- using map_type = std::unordered_map<key_type, map_value_type>;
+ using map_type = ankerl::unordered_dense::map<key_type, map_value_type>;
template <typename V>
void insert_or_update(const key_type& key, V&& value) {
diff --git a/src/core/arm/nce/patcher.h b/src/core/arm/nce/patcher.h
index f2b11fcda0..8612cfc63d 100644
--- a/src/core/arm/nce/patcher.h
+++ b/src/core/arm/nce/patcher.h
@@ -4,7 +4,7 @@
#pragma once
#include <span>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include <oaknut/code_block.hpp>
#include <oaknut/oaknut.hpp>
@@ -46,7 +46,7 @@ enum class PatchMode : u32 {
using ModuleTextAddress = u64;
using PatchTextAddress = u64;
-using EntryTrampolines = std::unordered_map<ModuleTextAddress, PatchTextAddress>;
+using EntryTrampolines = ankerl::unordered_dense::map<ModuleTextAddress, PatchTextAddress>;
class Patcher {
public:
diff --git a/src/core/file_sys/vfs/vfs_layered.cpp b/src/core/file_sys/vfs/vfs_layered.cpp
index 47b2a3c780..8dabe03e16 100644
--- a/src/core/file_sys/vfs/vfs_layered.cpp
+++ b/src/core/file_sys/vfs/vfs_layered.cpp
@@ -1,9 +1,12 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
#include <set>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include "core/file_sys/vfs/vfs_layered.h"
@@ -60,7 +63,7 @@ std::string LayeredVfsDirectory::GetFullPath() const {
std::vector<VirtualFile> LayeredVfsDirectory::GetFiles() const {
std::vector<VirtualFile> out;
- std::unordered_set<std::string> out_names;
+ ankerl::unordered_dense::set<std::string> out_names;
for (const auto& layer : dirs) {
for (auto& file : layer->GetFiles()) {
@@ -76,7 +79,7 @@ std::vector<VirtualFile> LayeredVfsDirectory::GetFiles() const {
std::vector<VirtualDir> LayeredVfsDirectory::GetSubdirectories() const {
std::vector<VirtualDir> out;
- std::unordered_set<std::string> out_names;
+ ankerl::unordered_dense::set<std::string> out_names;
for (const auto& layer : dirs) {
for (const auto& sd : layer->GetSubdirectories()) {
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h
index 13717cc090..975448f0dd 100644
--- a/src/core/hle/kernel/k_process.h
+++ b/src/core/hle/kernel/k_process.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
@@ -78,7 +78,7 @@ private:
std::array<DebugWatchpoint, Core::Hardware::NUM_WATCHPOINTS> m_watchpoints{};
std::map<KProcessAddress, u64> m_debug_page_refcounts{};
#ifdef HAS_NCE
- std::unordered_map<u64, u64> m_post_handlers{};
+ ankerl::unordered_dense::map<u64, u64> m_post_handlers{};
#endif
std::unique_ptr<Core::ExclusiveMonitor> m_exclusive_monitor;
Core::Memory::Memory m_memory;
@@ -493,7 +493,7 @@ public:
static void Switch(KProcess* cur_process, KProcess* next_process);
#ifdef HAS_NCE
- std::unordered_map<u64, u64>& GetPostHandlers() noexcept {
+ ankerl::unordered_dense::map<u64, u64>& GetPostHandlers() noexcept {
return m_post_handlers;
}
#endif
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 6986a98e35..5c2b6a4a88 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -10,7 +10,7 @@
#include <functional>
#include <memory>
#include <thread>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include "common/assert.h"
@@ -786,8 +786,8 @@ struct KernelCore::Impl {
std::optional<KObjectNameGlobalData> object_name_global_data;
- std::unordered_set<KAutoObject*> registered_objects;
- std::unordered_set<KAutoObject*> registered_in_use_objects;
+ ankerl::unordered_dense::set<KAutoObject*> registered_objects;
+ ankerl::unordered_dense::set<KAutoObject*> registered_in_use_objects;
std::mutex server_lock;
std::vector<std::unique_ptr<Service::ServerManager>> server_managers;
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 5d1a34281a..3b754e9397 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -11,7 +11,7 @@
#include <list>
#include <memory>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/polyfill_thread.h"
diff --git a/src/core/hle/service/am/frontend/applet_web_browser_types.h b/src/core/hle/service/am/frontend/applet_web_browser_types.h
index 0892a6a716..3574568f6f 100644
--- a/src/core/hle/service/am/frontend/applet_web_browser_types.h
+++ b/src/core/hle/service/am/frontend/applet_web_browser_types.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
@@ -7,7 +7,7 @@
#pragma once
#include <array>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_funcs.h"
@@ -176,6 +176,6 @@ struct WebCommonReturnValue {
};
static_assert(sizeof(WebCommonReturnValue) == 0x1010, "WebCommonReturnValue has incorrect size.");
-using WebArgInputTLVMap = std::unordered_map<WebArgInputTLVType, std::vector<u8>>;
+using WebArgInputTLVMap = ankerl::unordered_dense::map<WebArgInputTLVType, std::vector<u8>>;
} // namespace Service::AM::Frontend
diff --git a/src/core/hle/service/bcat/news/builtin_news.cpp b/src/core/hle/service/bcat/news/builtin_news.cpp
index 2c93da71e0..43b0445039 100644
--- a/src/core/hle/service/bcat/news/builtin_news.cpp
+++ b/src/core/hle/service/bcat/news/builtin_news.cpp
@@ -44,8 +44,8 @@ std::vector<u8> default_logo_small;
std::vector<u8> default_logo_large;
bool default_logos_loaded = false;
-std::unordered_map<std::string, std::vector<u8>> news_images_small;
-std::unordered_map<std::string, std::vector<u8>> news_images_large;
+ankerl::unordered_dense::map<std::string, std::vector<u8>> news_images_small;
+ankerl::unordered_dense::map<std::string, std::vector<u8>> news_images_large;
std::mutex images_mutex;
diff --git a/src/core/hle/service/bcat/news/news_storage.h b/src/core/hle/service/bcat/news/news_storage.h
index ad84e4080c..531e2adb9a 100644
--- a/src/core/hle/service/bcat/news/news_storage.h
+++ b/src/core/hle/service/bcat/news/news_storage.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
@@ -12,7 +12,7 @@
#include <optional>
#include <span>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -93,7 +93,7 @@ private:
static s64 Now();
mutable std::mutex mtx;
- std::unordered_map<std::string, StoredNews> items;
+ ankerl::unordered_dense::map<std::string, StoredNews> items;
size_t open_counter{};
};
diff --git a/src/core/hle/service/caps/caps_manager.h b/src/core/hle/service/caps/caps_manager.h
index 893a9075a0..22f5672e47 100644
--- a/src/core/hle/service/caps/caps_manager.h
+++ b/src/core/hle/service/caps/caps_manager.h
@@ -1,9 +1,12 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/fs/fs.h"
#include "core/hle/result.h"
@@ -85,7 +88,7 @@ private:
AlbumFileDateTime ConvertToAlbumDateTime(u64 posix_time) const;
bool is_mounted{};
- std::unordered_map<AlbumFileId, std::filesystem::path> album_files;
+ ankerl::unordered_dense::map<AlbumFileId, std::filesystem::path> album_files;
Core::System& system;
};
diff --git a/src/core/hle/service/ldn/lan_discovery.h b/src/core/hle/service/ldn/lan_discovery.h
index 0d15583172..d39197efff 100644
--- a/src/core/hle/service/ldn/lan_discovery.h
+++ b/src/core/hle/service/ldn/lan_discovery.h
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
@@ -15,7 +15,7 @@
#include <random>
#include <span>
#include <thread>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/logging/log.h"
#include "common/socket_types.h"
@@ -119,7 +119,7 @@ protected:
std::array<LanStation, StationCountMax> stations;
std::array<NodeLatestUpdate, NodeCountMax> node_changes{};
std::array<u8, NodeCountMax> node_last_states{};
- std::unordered_map<MacAddress, NetworkInfo, MACAddressHash> scan_results{};
+ ankerl::unordered_dense::map<MacAddress, NetworkInfo, MACAddressHash> scan_results{};
NodeInfo node_info{};
NetworkInfo network_info{};
State state{State::None};
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp
index b8a34d34eb..2fda8a3b90 100644
--- a/src/core/hle/service/lm/lm.cpp
+++ b/src/core/hle/service/lm/lm.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -7,7 +7,7 @@
#include <string>
#include <optional>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <boost/container_hash/hash.hpp>
#include "common/logging/log.h"
#include "core/core.h"
@@ -331,7 +331,7 @@ private:
};
static_assert(sizeof(LogPacketHeader) == 0x18, "LogPacketHeader is an invalid size");
- std::unordered_map<LogPacketHeaderEntry, std::vector<u8>> entries{};
+ ankerl::unordered_dense::map<LogPacketHeaderEntry, std::vector<u8>> entries{};
LogDestination destination{LogDestination::All};
};
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 8fecef96d2..710a95a455 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -23,7 +23,7 @@
#include <mutex>
#include <optional>
#include <thread>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <common/settings.h>
#ifdef _WIN32
diff --git a/src/core/hle/service/nvdrv/core/container.h b/src/core/hle/service/nvdrv/core/container.h
index cf549d7f32..62404e14a7 100644
--- a/src/core/hle/service/nvdrv/core/container.h
+++ b/src/core/hle/service/nvdrv/core/container.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: 2022 Skyline Team and Contributors
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -6,7 +9,7 @@
#include <deque>
#include <memory>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "core/device_memory_manager.h"
#include "core/hle/service/nvdrv/nvdata.h"
diff --git a/src/core/hle/service/nvdrv/core/nvmap.h b/src/core/hle/service/nvdrv/core/nvmap.h
index b8be599ae9..17b9ccd1c7 100644
--- a/src/core/hle/service/nvdrv/core/nvmap.h
+++ b/src/core/hle/service/nvdrv/core/nvmap.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-FileCopyrightText: 2022 Skyline Team and Contributors
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -9,7 +12,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <assert.h>
#include "common/bit_field.h"
@@ -158,7 +161,7 @@ private:
std::list<std::shared_ptr<Handle>> unmap_queue{};
std::mutex unmap_queue_lock{}; //!< Protects access to `unmap_queue`
- std::unordered_map<Handle::Id, std::shared_ptr<Handle>>
+ ankerl::unordered_dense::map<Handle::Id, std::shared_ptr<Handle>>
handles{}; //!< Main owning map of handles
std::mutex handles_lock; //!< Protects access to `handles`
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
index c9a6737ba9..7d50fd4c33 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
@@ -13,7 +13,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/address_space.h"
@@ -113,7 +113,7 @@ private:
};
static_assert(sizeof(IoctlRemapEntry) == 20, "IoctlRemapEntry is incorrect size");
- std::unordered_set<s64_le> map_buffer_offsets{};
+ ankerl::unordered_dense::set<s64_le> map_buffer_offsets{};
struct IoctlMapBufferEx {
MappingFlags flags{}; // bit0: fixed_offset, bit2: cacheable
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
index b8854aab95..c29231dc0c 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -210,7 +210,7 @@ private:
NvCore::SyncpointManager& syncpoint_manager;
NvCore::NvMap& nvmap;
std::shared_ptr<Tegra::Control::ChannelState> channel_state;
- std::unordered_map<DeviceFD, NvCore::SessionId> sessions;
+ ankerl::unordered_dense::map<DeviceFD, NvCore::SessionId> sessions;
u32 channel_syncpoint;
std::mutex channel_mutex;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
index 63e6377603..6b66a0d28d 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
@@ -1,10 +1,13 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <deque>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -128,7 +131,7 @@ protected:
NvCore::NvMap& nvmap;
NvCore::ChannelType channel_type;
std::array<u32, MaxSyncPoints> device_syncpoints{};
- std::unordered_map<DeviceFD, NvCore::SessionId> sessions;
+ ankerl::unordered_dense::map<DeviceFD, NvCore::SessionId> sessions;
};
}; // namespace Devices
} // namespace Service::Nvidia
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.h b/src/core/hle/service/nvdrv/devices/nvmap.h
index d07d85f888..19c5b479df 100644
--- a/src/core/hle/service/nvdrv/devices/nvmap.h
+++ b/src/core/hle/service/nvdrv/devices/nvmap.h
@@ -1,10 +1,13 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <memory>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_funcs.h"
#include "common/common_types.h"
@@ -115,7 +118,7 @@ private:
NvCore::Container& container;
NvCore::NvMap& file;
- std::unordered_map<DeviceFD, NvCore::SessionId> sessions;
+ ankerl::unordered_dense::map<DeviceFD, NvCore::SessionId> sessions;
};
} // namespace Service::Nvidia::Devices
diff --git a/src/core/hle/service/nvdrv/nvdrv.h b/src/core/hle/service/nvdrv/nvdrv.h
index b76f81e594..329ac91c41 100644
--- a/src/core/hle/service/nvdrv/nvdrv.h
+++ b/src/core/hle/service/nvdrv/nvdrv.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: 2021 Skyline Team and Contributors
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -9,7 +12,7 @@
#include <memory>
#include <span>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_types.h"
#include "core/hle/service/kernel_helpers.h"
@@ -100,7 +103,7 @@ private:
/// Id to use for the next open file descriptor.
DeviceFD next_fd = 1;
- using FilesContainerType = std::unordered_map<DeviceFD, std::shared_ptr<Devices::nvdevice>>;
+ using FilesContainerType = ankerl::unordered_dense::map<DeviceFD, std::shared_ptr<Devices::nvdevice>>;
/// Mapping of file descriptors to the devices they reference.
FilesContainerType open_files;
@@ -108,7 +111,7 @@ private:
EventInterface events_interface;
- std::unordered_map<std::string, std::function<FilesContainerType::iterator(DeviceFD)>> builders;
+ ankerl::unordered_dense::map<std::string, std::function<FilesContainerType::iterator(DeviceFD)>> builders;
};
void LoopProcess(Core::System& system);
diff --git a/src/core/hle/service/nvnflinger/hos_binder_driver_server.h b/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
index f4b4060115..b66f1776b0 100644
--- a/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
+++ b/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -5,7 +8,7 @@
#include <memory>
#include <mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_types.h"
#include "core/hle/service/nvnflinger/binder.h"
@@ -36,8 +39,8 @@ private:
mutable std::mutex lock;
s32 last_id = 0;
- std::unordered_map<s32, std::shared_ptr<android::IBinder>> binders;
- std::unordered_map<s32, RefCounts> refcounts;
+ ankerl::unordered_dense::map<s32, std::shared_ptr<android::IBinder>> binders;
+ ankerl::unordered_dense::map<s32, RefCounts> refcounts;
};
} // namespace Service::Nvnflinger
diff --git a/src/core/hle/service/olsc/daemon_controller.h b/src/core/hle/service/olsc/daemon_controller.h
index 4a4b89317b..fc7dd7bbcb 100644
--- a/src/core/hle/service/olsc/daemon_controller.h
+++ b/src/core/hle/service/olsc/daemon_controller.h
@@ -4,7 +4,7 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/uuid.h"
#include "core/hle/service/cmif_types.h"
@@ -54,10 +54,10 @@ private:
}
};
- std::unordered_map<AppKey, bool, AppKeyHash> app_auto_transfer_{};
- std::unordered_map<Common::UUID, bool> global_auto_upload_{};
- std::unordered_map<Common::UUID, bool> global_auto_download_{};
- std::unordered_map<AppKey, u8, AppKeyHash> autonomy_task_status_{};
+ ankerl::unordered_dense::map<AppKey, bool, AppKeyHash> app_auto_transfer_{};
+ ankerl::unordered_dense::map<Common::UUID, bool> global_auto_upload_{};
+ ankerl::unordered_dense::map<Common::UUID, bool> global_auto_download_{};
+ ankerl::unordered_dense::map<AppKey, u8, AppKeyHash> autonomy_task_status_{};
};
} // namespace Service::OLSC
diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h
index d5f372b97d..039d53ebf8 100644
--- a/src/core/hle/service/sm/sm.h
+++ b/src/core/hle/service/sm/sm.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -10,7 +10,7 @@
#include <memory>
#include <mutex>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <concepts>
#include "core/hle/kernel/k_port.h"
@@ -97,8 +97,8 @@ private:
/// Map of registered services, retrieved using GetServicePort.
std::mutex lock;
- std::unordered_map<std::string, SessionRequestHandlerFactory> registered_services;
- std::unordered_map<std::string, Kernel::KClientPort*> service_ports;
+ ankerl::unordered_dense::map<std::string, SessionRequestHandlerFactory> registered_services;
+ ankerl::unordered_dense::map<std::string, Kernel::KClientPort*> service_ports;
/// Kernel context
Kernel::KernelCore& kernel;
diff --git a/src/core/hle/service/vi/conductor.h b/src/core/hle/service/vi/conductor.h
index 6dd105dd40..59eb2fd022 100644
--- a/src/core/hle/service/vi/conductor.h
+++ b/src/core/hle/service/vi/conductor.h
@@ -1,10 +1,13 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <memory>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_types.h"
#include "common/polyfill_thread.h"
@@ -45,7 +48,7 @@ private:
private:
Core::System& m_system;
Container& m_container;
- std::unordered_map<u64, VsyncManager> m_vsync_managers;
+ ankerl::unordered_dense::map<u64, VsyncManager> m_vsync_managers;
std::shared_ptr<Core::Timing::EventType> m_event;
Common::Event m_signal;
std::jthread m_thread;
diff --git a/src/core/launch_timestamp_cache.cpp b/src/core/launch_timestamp_cache.cpp
index 95b6bc8c41..217b3f28da 100644
--- a/src/core/launch_timestamp_cache.cpp
+++ b/src/core/launch_timestamp_cache.cpp
@@ -8,7 +8,7 @@
#include <mutex>
#include <sstream>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <fmt/format.h>
#include <nlohmann/json.hpp>
@@ -21,8 +21,8 @@
namespace Core::LaunchTimestampCache {
namespace {
-using CacheMap = std::unordered_map<u64, s64>;
-using CountMap = std::unordered_map<u64, u64>;
+using CacheMap = ankerl::unordered_dense::map<u64, s64>;
+using CountMap = ankerl::unordered_dense::map<u64, u64>;
std::mutex g_mutex;
CacheMap g_cache;
diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt
index fc22f073f7..e0d1f942f0 100644
--- a/src/dynarmic/CMakeLists.txt
+++ b/src/dynarmic/CMakeLists.txt
@@ -118,6 +118,7 @@ endif()
find_package(fmt 8 CONFIG)
find_package(mcl 0.1.12 REQUIRED)
+find_package(unordered_dense REQUIRED)
if ("arm64" IN_LIST ARCHITECTURE OR DYNARMIC_TESTS)
find_package(oaknut 2.0.1 CONFIG)
diff --git a/src/dynarmic/src/dynarmic/CMakeLists.txt b/src/dynarmic/src/dynarmic/CMakeLists.txt
index f2ea9de455..8b55a864a3 100644
--- a/src/dynarmic/src/dynarmic/CMakeLists.txt
+++ b/src/dynarmic/src/dynarmic/CMakeLists.txt
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
include(TargetArchitectureSpecificSources)
@@ -356,20 +356,10 @@ set_target_properties(dynarmic PROPERTIES
SOVERSION ${dynarmic_VERSION_MAJOR}.${dynarmic_VERSION_MINOR}
)
-if (TARGET unordered_dense::unordered_dense)
- # weird quirk of system installs
- target_link_libraries(dynarmic
- PRIVATE
- unordered_dense::unordered_dense
- )
-endif()
-
target_compile_options(dynarmic PRIVATE ${DYNARMIC_CXX_FLAGS})
-target_link_libraries(dynarmic
- PUBLIC
- fmt::fmt
- merry::mcl
-)
+
+target_link_libraries(dynarmic PRIVATE unordered_dense::unordered_dense)
+target_link_libraries(dynarmic PUBLIC fmt::fmt merry::mcl)
if (BOOST_NO_HEADERS)
target_link_libraries(dynarmic PRIVATE Boost::variant Boost::icl Boost::pool)
diff --git a/src/dynarmic/tests/A64/fibonacci.cpp b/src/dynarmic/tests/A64/fibonacci.cpp
index 713a48cab7..9a10f52614 100644
--- a/src/dynarmic/tests/A64/fibonacci.cpp
+++ b/src/dynarmic/tests/A64/fibonacci.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
/* This file is part of the dynarmic project.
@@ -8,7 +8,7 @@
#include <array>
#include <exception>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <catch2/catch_test_macros.hpp>
#include "dynarmic/common/common_types.h"
@@ -23,7 +23,7 @@ namespace {
class MyEnvironment final : public A64::UserCallbacks {
public:
u64 ticks_left = 0;
- std::unordered_map<u64, u8> memory{};
+ ankerl::unordered_dense::map<u64, u8> memory{};
u8 MemoryRead8(u64 vaddr) override {
return memory[vaddr];
diff --git a/src/dynarmic/tests/A64/testenv.h b/src/dynarmic/tests/A64/testenv.h
index 05eb0e2d39..67b0f97a65 100644
--- a/src/dynarmic/tests/A64/testenv.h
+++ b/src/dynarmic/tests/A64/testenv.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
/* This file is part of the dynarmic project.
@@ -8,7 +8,7 @@
#pragma once
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "dynarmic/common/assert.h"
#include "dynarmic/common/common_types.h"
#include "dynarmic/interface/A64/a64.h"
@@ -23,7 +23,7 @@ public:
u64 code_mem_start_address = 0;
std::vector<u32> code_mem;
- std::unordered_map<u64, u8> modified_memory;
+ ankerl::unordered_dense::map<u64, u8> modified_memory;
std::vector<std::string> interrupts;
bool IsInCodeMem(u64 vaddr) const {
diff --git a/src/hid_core/frontend/emulated_console.h b/src/hid_core/frontend/emulated_console.h
index 847551395c..b8ce45f05c 100644
--- a/src/hid_core/frontend/emulated_console.h
+++ b/src/hid_core/frontend/emulated_console.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -8,7 +11,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_funcs.h"
#include "common/common_types.h"
@@ -182,7 +185,7 @@ private:
mutable std::mutex mutex;
mutable std::mutex callback_mutex;
- std::unordered_map<int, ConsoleUpdateCallback> callback_list;
+ ankerl::unordered_dense::map<int, ConsoleUpdateCallback> callback_list;
int last_callback_key = 0;
// Stores the current status of all console input
diff --git a/src/hid_core/frontend/emulated_controller.h b/src/hid_core/frontend/emulated_controller.h
index b8eafbae5c..e4256faa3e 100644
--- a/src/hid_core/frontend/emulated_controller.h
+++ b/src/hid_core/frontend/emulated_controller.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -11,7 +11,7 @@
#include <memory>
#include <mutex>
#include <shared_mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -636,7 +636,7 @@ private:
mutable std::shared_mutex callback_mutex;
mutable std::shared_mutex npad_mutex;
mutable std::shared_mutex connect_mutex;
- std::unordered_map<int, ControllerUpdateCallback> callback_list;
+ ankerl::unordered_dense::map<int, ControllerUpdateCallback> callback_list;
int last_callback_key = 0;
// Stores the current status of all controller input
diff --git a/src/hid_core/frontend/emulated_devices.h b/src/hid_core/frontend/emulated_devices.h
index b2e57318cc..fb6c982a70 100644
--- a/src/hid_core/frontend/emulated_devices.h
+++ b/src/hid_core/frontend/emulated_devices.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -7,7 +10,7 @@
#include <functional>
#include <memory>
#include <mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -202,7 +205,7 @@ private:
mutable std::mutex mutex;
mutable std::mutex callback_mutex;
- std::unordered_map<int, InterfaceUpdateCallback> callback_list;
+ ankerl::unordered_dense::map<int, InterfaceUpdateCallback> callback_list;
int last_callback_key = 0;
// Stores the current status of all external device input
diff --git a/src/input_common/drivers/android.h b/src/input_common/drivers/android.h
index 03e2b2c983..18678de602 100644
--- a/src/input_common/drivers/android.h
+++ b/src/input_common/drivers/android.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -87,7 +90,7 @@ public:
Common::Input::ButtonNames GetUIName(const Common::ParamPackage& params) const override;
private:
- std::unordered_map<PadIdentifier, jobject> input_devices;
+ ankerl::unordered_dense::map<PadIdentifier, jobject> input_devices;
/// Returns the correct identifier corresponding to the player index
PadIdentifier GetIdentifier(const std::string& guid, size_t port) const;
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp
index ddee11035c..81b0a2313a 100644
--- a/src/input_common/drivers/sdl_driver.cpp
+++ b/src/input_common/drivers/sdl_driver.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2018 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -570,7 +570,7 @@ SDLDriver::~SDLDriver() {
std::vector<Common::ParamPackage> SDLDriver::GetInputDevices() const {
std::vector<Common::ParamPackage> devices;
- std::unordered_map<int, std::shared_ptr<SDLJoystick>> joycon_pairs;
+ ankerl::unordered_dense::map<int, std::shared_ptr<SDLJoystick>> joycon_pairs;
for (const auto& [key, value] : joystick_map) {
for (const auto& joystick : value) {
if (!joystick->GetSDLJoystick()) {
diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h
index a140ad072c..1677ab8289 100644
--- a/src/input_common/drivers/sdl_driver.h
+++ b/src/input_common/drivers/sdl_driver.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2018 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -6,7 +9,7 @@
#include <atomic>
#include <mutex>
#include <thread>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <SDL.h>
@@ -116,7 +119,7 @@ private:
Common::SPSCQueue<VibrationRequest> vibration_queue;
/// Map of GUID of a list of corresponding virtual Joysticks
- std::unordered_map<Common::UUID, std::vector<std::shared_ptr<SDLJoystick>>> joystick_map;
+ ankerl::unordered_dense::map<Common::UUID, std::vector<std::shared_ptr<SDLJoystick>>> joystick_map;
std::mutex joystick_map_mutex;
bool start_thread = false;
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h
index 3e328509b1..7ad40027e4 100644
--- a/src/input_common/input_engine.h
+++ b/src/input_common/input_engine.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -5,7 +8,7 @@
#include <functional>
#include <mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_types.h"
#include "common/input.h"
@@ -267,10 +270,10 @@ protected:
private:
struct ControllerData {
- std::unordered_map<int, bool> buttons;
- std::unordered_map<int, u8> hat_buttons;
- std::unordered_map<int, float> axes;
- std::unordered_map<int, BasicMotion> motions;
+ ankerl::unordered_dense::map<int, bool> buttons;
+ ankerl::unordered_dense::map<int, u8> hat_buttons;
+ ankerl::unordered_dense::map<int, float> axes;
+ ankerl::unordered_dense::map<int, BasicMotion> motions;
Common::Input::BatteryLevel battery{};
Common::Input::BodyColorStatus color{};
Common::Input::CameraStatus camera{};
@@ -298,8 +301,8 @@ private:
bool configuring{false};
const std::string input_engine;
int last_callback_key = 0;
- std::unordered_map<PadIdentifier, ControllerData> controller_list;
- std::unordered_map<int, InputIdentifier> callback_list;
+ ankerl::unordered_dense::map<PadIdentifier, ControllerData> controller_list;
+ ankerl::unordered_dense::map<int, InputIdentifier> callback_list;
MappingCallback mapping_callback;
};
diff --git a/src/input_common/main.h b/src/input_common/main.h
index 1d19019ee8..d0e447ec2d 100644
--- a/src/input_common/main.h
+++ b/src/input_common/main.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -5,7 +8,7 @@
#include <memory>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
namespace Common {
@@ -53,9 +56,9 @@ enum class InputType { None, Button, Stick, Motion, Touch };
* Given a ParamPackage for a Device returned from `GetInputDevices`, attempt to get the default
* mapping for the device.
*/
-using AnalogMapping = std::unordered_map<Settings::NativeAnalog::Values, Common::ParamPackage>;
-using ButtonMapping = std::unordered_map<Settings::NativeButton::Values, Common::ParamPackage>;
-using MotionMapping = std::unordered_map<Settings::NativeMotion::Values, Common::ParamPackage>;
+using AnalogMapping = ankerl::unordered_dense::map<Settings::NativeAnalog::Values, Common::ParamPackage>;
+using ButtonMapping = ankerl::unordered_dense::map<Settings::NativeButton::Values, Common::ParamPackage>;
+using MotionMapping = ankerl::unordered_dense::map<Settings::NativeMotion::Values, Common::ParamPackage>;
class InputSubsystem {
public:
diff --git a/src/shader_recompiler/environment.h b/src/shader_recompiler/environment.h
index 106fe8d32d..0a6e4bfcaa 100644
--- a/src/shader_recompiler/environment.h
+++ b/src/shader_recompiler/environment.h
@@ -7,7 +7,7 @@
#pragma once
#include <array>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_types.h"
#include "shader_recompiler/program_header.h"
@@ -125,9 +125,9 @@ protected:
u32 start_address{};
bool is_proprietary_driver{};
public:
- std::unordered_map<CbufWordKey, u32, CbufWordKeyHash> cbuf_word_cache;
- std::unordered_map<HandleKey, u32, HandleKeyHash> handle_cache;
- std::unordered_map<const IR::Inst*, ConstBufferAddr> track_cache;
+ ankerl::unordered_dense::map<CbufWordKey, u32, CbufWordKeyHash> cbuf_word_cache;
+ ankerl::unordered_dense::map<HandleKey, u32, HandleKeyHash> handle_cache;
+ ankerl::unordered_dense::map<const IR::Inst*, ConstBufferAddr> track_cache;
};
} // namespace Shader
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
index 6d325b4aad..eaf1d88f2e 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -7,7 +7,7 @@
#include <algorithm>
#include <memory>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include <vector>
@@ -390,7 +390,7 @@ private:
std::optional<Node> return_label) {
Statement* const false_stmt{pool.Create(Identity{}, IR::Condition{false}, &root_stmt)};
Tree& root{root_stmt.children};
- std::unordered_map<Flow::Block*, Node> local_labels;
+ ankerl::unordered_dense::map<Flow::Block*, Node> local_labels;
local_labels.reserve(function.blocks.size());
for (Flow::Block& block : function.blocks) {
diff --git a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp
index 07cabca43e..2bde38a661 100644
--- a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp
+++ b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -16,7 +19,7 @@
#include <deque>
#include <map>
#include <span>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <variant>
#include <vector>
@@ -50,8 +53,8 @@ struct IndirectBranchVariable {
auto operator<=>(const IndirectBranchVariable&) const noexcept = default;
};
-using Variant = std::variant<IR::Reg, IR::Pred, ZeroFlagTag, SignFlagTag, CarryFlagTag,
- OverflowFlagTag, GotoVariable, IndirectBranchVariable>;
+using Variant = std::variant<IR::Reg, IR::Pred, ZeroFlagTag, SignFlagTag, CarryFlagTag, OverflowFlagTag, GotoVariable, IndirectBranchVariable>;
+// TODO: majority of these require stable iterators, test with XC beforehand
using ValueMap = std::unordered_map<IR::Block*, IR::Value>;
struct DefTable {
@@ -112,6 +115,7 @@ struct DefTable {
}
std::array<ValueMap, IR::NUM_USER_PREDS> preds;
+ // TODO: Requires stable iterators
std::unordered_map<u32, ValueMap> goto_vars;
ValueMap indirect_branch_var;
ValueMap zero_flag;
@@ -165,7 +169,8 @@ public:
template <typename Type>
IR::Value ReadVariable(Type variable, IR::Block* root_block) {
- boost::container::small_vector<ReadState<Type>, 64> stack{
+ // TODO: Windows commits sodoku if you use small_vector
+ std::vector<ReadState<Type>> stack{
ReadState<Type>(nullptr),
ReadState<Type>(root_block),
};
@@ -295,6 +300,7 @@ private:
return same;
}
+ // TODO: Windows dies with stack exhaustion?
std::unordered_map<IR::Block*, std::map<Variant, IR::Inst*>> incomplete_phis;
DefTable current_def;
};
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp
index 0288db0ae1..20b8591072 100644
--- a/src/shader_recompiler/ir_opt/texture_pass.cpp
+++ b/src/shader_recompiler/ir_opt/texture_pass.cpp
@@ -7,7 +7,7 @@
#include <algorithm>
#include <bit>
#include <optional>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <tuple>
#include <limits>
#include <boost/container/small_vector.hpp>
diff --git a/src/tests/common/fibers.cpp b/src/tests/common/fibers.cpp
index 83c0946c9e..ce17a5c52c 100644
--- a/src/tests/common/fibers.cpp
+++ b/src/tests/common/fibers.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -8,7 +11,7 @@
#include <mutex>
#include <stdexcept>
#include <thread>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include <catch2/catch_test_macros.hpp>
@@ -36,7 +39,7 @@ public:
private:
mutable std::mutex mutex;
- std::unordered_map<std::thread::id, u32> ids;
+ ankerl::unordered_dense::map<std::thread::id, u32> ids;
};
class TestControl1 {
diff --git a/src/tests/video_core/memory_tracker.cpp b/src/tests/video_core/memory_tracker.cpp
index 08ebf05237..5fd8037446 100644
--- a/src/tests/video_core/memory_tracker.cpp
+++ b/src/tests/video_core/memory_tracker.cpp
@@ -3,7 +3,7 @@
#include <memory>
#include <stdexcept>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <tuple>
#include <vector>
#include <optional>
@@ -65,7 +65,7 @@ public:
}
private:
- std::unordered_map<u64, int> page_table;
+ ankerl::unordered_dense::map<u64, int> page_table;
std::vector<std::tuple<DAddr, u64, int>> calls;
size_t update_calls = 0;
};
diff --git a/src/video_core/buffer_cache/buffer_cache_base.h b/src/video_core/buffer_cache/buffer_cache_base.h
index ed50634683..3c0bc81758 100644
--- a/src/video_core/buffer_cache/buffer_cache_base.h
+++ b/src/video_core/buffer_cache/buffer_cache_base.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
@@ -14,7 +14,7 @@
#include <mutex>
#include <numeric>
#include <span>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
diff --git a/src/video_core/buffer_cache/memory_tracker_base.h b/src/video_core/buffer_cache/memory_tracker_base.h
index 4181b0ae54..2c571271d6 100644
--- a/src/video_core/buffer_cache/memory_tracker_base.h
+++ b/src/video_core/buffer_cache/memory_tracker_base.h
@@ -11,7 +11,7 @@
#include <deque>
#include <limits>
#include <type_traits>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include "common/alignment.h"
@@ -257,7 +257,7 @@ private:
std::array<Manager*, NUM_HIGH_PAGES> top_tier{};
std::deque<std::array<Manager, MANAGER_POOL_SIZE>> manager_pool;
std::deque<Manager*> free_managers;
- std::unordered_set<u32> cached_pages;
+ ankerl::unordered_dense::set<u32> cached_pages;
DeviceTracker* device_tracker = nullptr;
};
diff --git a/src/video_core/control/channel_state_cache.h b/src/video_core/control/channel_state_cache.h
index 58f6a34c16..f8b8abcac6 100644
--- a/src/video_core/control/channel_state_cache.h
+++ b/src/video_core/control/channel_state_cache.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
@@ -10,7 +10,7 @@
#include <limits>
#include <mutex>
#include <optional>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -88,14 +88,14 @@ protected:
std::deque<P> channel_storage;
std::deque<size_t> free_channel_ids;
- std::unordered_map<s32, size_t> channel_map;
+ ankerl::unordered_dense::map<s32, size_t> channel_map;
std::vector<size_t> active_channel_ids;
struct AddressSpaceRef {
size_t ref_count;
size_t storage_id;
Tegra::MemoryManager* gpu_memory;
};
- std::unordered_map<size_t, AddressSpaceRef> address_spaces;
+ ankerl::unordered_dense::map<size_t, AddressSpaceRef> address_spaces;
mutable std::mutex config_mutex;
virtual void OnGPUASRegister([[maybe_unused]] size_t map_id) {}
diff --git a/src/video_core/control/scheduler.h b/src/video_core/control/scheduler.h
index 44addf61c4..9c2b9de32b 100644
--- a/src/video_core/control/scheduler.h
+++ b/src/video_core/control/scheduler.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -5,7 +8,7 @@
#include <memory>
#include <mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "video_core/dma_pusher.h"
@@ -27,7 +30,7 @@ public:
void DeclareChannel(std::shared_ptr<ChannelState> new_channel);
private:
- std::unordered_map<s32, std::shared_ptr<ChannelState>> channels;
+ ankerl::unordered_dense::map<s32, std::shared_ptr<ChannelState>> channels;
std::mutex scheduling_guard;
GPU& gpu;
};
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 8c50a4ea2f..5312c04b6f 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -3056,7 +3056,7 @@ public:
void SetHLEReplacementAttributeType(u32 bank, u32 offset, HLEReplacementAttributeType name);
- std::unordered_map<u64, HLEReplacementAttributeType> replace_table;
+ ankerl::unordered_dense::map<u64, HLEReplacementAttributeType> replace_table;
static_assert(sizeof(Regs) == Regs::NUM_REGS * sizeof(u32), "Maxwell3D Regs has wrong size");
static_assert(std::is_trivially_copyable_v<Regs>, "Maxwell3D Regs must be trivially copyable");
diff --git a/src/video_core/engines/sw_blitter/converter.cpp b/src/video_core/engines/sw_blitter/converter.cpp
index b4722f7976..6682c96444 100644
--- a/src/video_core/engines/sw_blitter/converter.cpp
+++ b/src/video_core/engines/sw_blitter/converter.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
@@ -7,7 +7,7 @@
#include <array>
#include <cmath>
#include <span>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <bit>
#include <numeric>
#include "common/assert.h"
@@ -924,7 +924,7 @@ public:
};
struct ConverterFactory::ConverterFactoryImpl {
- std::unordered_map<RenderTargetFormat, std::unique_ptr<Converter>> converters_cache;
+ ankerl::unordered_dense::map<RenderTargetFormat, std::unique_ptr<Converter>> converters_cache;
};
ConverterFactory::ConverterFactory() {
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 36d726c929..d65658323e 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -373,7 +373,7 @@ struct GPU::Impl {
std::unique_ptr<Core::Frontend::GraphicsContext> cpu_context;
std::unique_ptr<Tegra::Control::Scheduler> scheduler;
- std::unordered_map<s32, std::shared_ptr<Tegra::Control::ChannelState>> channels;
+ ankerl::unordered_dense::map<s32, std::shared_ptr<Tegra::Control::ChannelState>> channels;
Tegra::Control::ChannelState* current_channel;
s32 bound_channel{-1};
diff --git a/src/video_core/gpu_logging/gpu_logging.h b/src/video_core/gpu_logging/gpu_logging.h
index c248e9b036..134fa94c0f 100644
--- a/src/video_core/gpu_logging/gpu_logging.h
+++ b/src/video_core/gpu_logging/gpu_logging.h
@@ -10,7 +10,7 @@
#include <set>
#include <span>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -154,7 +154,7 @@ private:
mutable std::mutex ring_buffer_mutex;
// Memory tracking
- std::unordered_map<uintptr_t, MemoryAllocationEntry> memory_allocations;
+ ankerl::unordered_dense::map<uintptr_t, MemoryAllocationEntry> memory_allocations;
mutable std::mutex memory_mutex;
// Statistics
diff --git a/src/video_core/host1x/codecs/decoder.h b/src/video_core/host1x/codecs/decoder.h
index 22e6db8151..d25da81fd4 100755..100644
--- a/src/video_core/host1x/codecs/decoder.h
+++ b/src/video_core/host1x/codecs/decoder.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -7,7 +10,7 @@
#include <mutex>
#include <optional>
#include <string_view>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <queue>
#include "common/common_types.h"
diff --git a/src/video_core/host1x/host1x.h b/src/video_core/host1x/host1x.h
index 98dd593185..d7534da23a 100644
--- a/src/video_core/host1x/host1x.h
+++ b/src/video_core/host1x/host1x.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project
@@ -6,8 +6,8 @@
#pragma once
+#include <ankerl/unordered_dense.h>
#include <unordered_map>
-#include <unordered_set>
#include <queue>
#include "common/common_types.h"
@@ -134,15 +134,15 @@ private:
if (it == map->second.end()) {
return {};
}
-
+ // TODO: this "mapped" prevents us from fully embracing ankerl
return std::move(map->second.extract(it).mapped());
}
using FramePtr = std::shared_ptr<FFmpeg::Frame>;
std::mutex m_mutex{};
- std::unordered_map<s32, std::deque<std::pair<u64, FramePtr>>> m_presentation_order;
- std::unordered_map<s32, std::unordered_map<u64, FramePtr>> m_decode_order;
+ ankerl::unordered_dense::map<s32, std::deque<std::pair<u64, FramePtr>>> m_presentation_order;
+ ankerl::unordered_dense::map<s32, std::unordered_map<u64, FramePtr>> m_decode_order;
static constexpr size_t MAX_PRESENT_QUEUE = 100;
static constexpr size_t MAX_DECODE_MAP = 200;
@@ -218,7 +218,7 @@ private:
Tegra::MemoryManager gmmu_manager;
std::unique_ptr<Common::FlatAllocator<u32, 0, 32>> allocator;
FrameQueue frame_queue;
- std::unordered_map<s32, std::unique_ptr<CDmaPusher>> devices;
+ ankerl::unordered_dense::map<s32, std::unique_ptr<CDmaPusher>> devices;
#ifdef YUZU_LEGACY
std::once_flag nvdec_first_init;
std::once_flag vic_first_init;
diff --git a/src/video_core/macro.h b/src/video_core/macro.h
index 685097a693..9bdb4219ce 100644
--- a/src/video_core/macro.h
+++ b/src/video_core/macro.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
@@ -7,7 +7,7 @@
#pragma once
#include <memory>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/bit_field.h"
#include "common/common_types.h"
@@ -147,8 +147,8 @@ private:
bool has_hle_program{};
};
- std::unordered_map<u32, CacheInfo> macro_cache;
- std::unordered_map<u32, std::vector<u32>> uploaded_macro_code;
+ ankerl::unordered_dense::map<u32, CacheInfo> macro_cache;
+ ankerl::unordered_dense::map<u32, std::vector<u32>> uploaded_macro_code;
std::optional<HLEMacro> hle_macros;
Engines::Maxwell3D& maxwell3d;
bool is_interpreted;
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h
index e1019f2285..ebb87fe65a 100644
--- a/src/video_core/query_cache.h
+++ b/src/video_core/query_cache.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -12,8 +15,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <unordered_map>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/assert.h"
@@ -348,7 +350,7 @@ private:
mutable std::recursive_mutex mutex;
- std::unordered_map<u64, std::vector<CachedQuery>> cached_queries;
+ ankerl::unordered_dense::map<u64, std::vector<CachedQuery>> cached_queries;
std::array<CounterStream, VideoCore::NumQueryTypes> streams;
diff --git a/src/video_core/query_cache/query_cache.h b/src/video_core/query_cache/query_cache.h
index 6e084cc079..3aeeb8dcab 100644
--- a/src/video_core/query_cache/query_cache.h
+++ b/src/video_core/query_cache/query_cache.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
@@ -10,7 +10,7 @@
#include <deque>
#include <memory>
#include <mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include "common/assert.h"
diff --git a/src/video_core/query_cache/query_cache_base.h b/src/video_core/query_cache/query_cache_base.h
index 00c25c8d63..242e24388f 100644
--- a/src/video_core/query_cache/query_cache_base.h
+++ b/src/video_core/query_cache/query_cache_base.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -7,7 +10,7 @@
#include <mutex>
#include <optional>
#include <span>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include "common/assert.h"
@@ -157,7 +160,7 @@ protected:
}
}
- using ContentCache = std::unordered_map<u64, std::unordered_map<u32, QueryLocation>>;
+ using ContentCache = ankerl::unordered_dense::map<u64, ankerl::unordered_dense::map<u32, QueryLocation>>;
void InvalidateQuery(QueryLocation location);
bool IsQueryDirty(QueryLocation location);
@@ -165,7 +168,7 @@ protected:
void RequestGuestHostSync();
void UnregisterPending();
- std::unordered_map<u64, std::unordered_map<u32, QueryLocation>> cached_queries;
+ ankerl::unordered_dense::map<u64, ankerl::unordered_dense::map<u32, QueryLocation>> cached_queries;
std::mutex cache_mutex;
struct QueryCacheBaseImpl;
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h
index 23ebe50196..a0acfc48c1 100644
--- a/src/video_core/renderer_opengl/gl_buffer_cache.h
+++ b/src/video_core/renderer_opengl/gl_buffer_cache.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -8,7 +8,7 @@
#include <array>
#include <span>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_types.h"
#include "video_core/buffer_cache/buffer_cache_base.h"
@@ -242,7 +242,7 @@ private:
u32 index_buffer_offset = 0;
u64 device_access_memory;
- std::unordered_map<GPUVAddr, OGLTransformFeedback> tfb_objects;
+ ankerl::unordered_dense::map<GPUVAddr, OGLTransformFeedback> tfb_objects;
};
struct BufferCacheParams {
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h
index 2b46c22c70..3398ba6f51 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_cache.h
@@ -1,10 +1,13 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <filesystem>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "common/common_types.h"
#include "common/thread_worker.h"
@@ -79,8 +82,8 @@ private:
GraphicsPipeline* current_pipeline{};
ShaderContext::ShaderPools main_pools;
- std::unordered_map<GraphicsPipelineKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
- std::unordered_map<ComputePipelineKey, std::unique_ptr<ComputePipeline>> compute_cache;
+ ankerl::unordered_dense::map<GraphicsPipelineKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
+ ankerl::unordered_dense::map<ComputePipelineKey, std::unique_ptr<ComputePipeline>> compute_cache;
Shader::Profile profile;
Shader::HostTranslateInfo host_info;
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h
index e2a2022cb2..dfcef4b0b6 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.h
+++ b/src/video_core/renderer_opengl/gl_texture_cache.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
@@ -157,7 +157,7 @@ private:
UtilShaders util_shaders;
FormatConversionPass format_conversion_pass;
- std::array<std::unordered_map<GLenum, FormatProperties>, 3> format_properties;
+ std::array<ankerl::unordered_dense::map<GLenum, FormatProperties>, 3> format_properties;
bool has_broken_texture_view_formats = false;
OGLTexture null_image_1d_array;
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h
index 7909bd8cf0..1f7dab935c 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -8,7 +11,7 @@
#include <filesystem>
#include <memory>
#include <type_traits>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -155,8 +158,8 @@ private:
GraphicsPipelineCacheKey graphics_key{};
GraphicsPipeline* current_pipeline{};
- std::unordered_map<ComputePipelineCacheKey, std::unique_ptr<ComputePipeline>> compute_cache;
- std::unordered_map<GraphicsPipelineCacheKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
+ ankerl::unordered_dense::map<ComputePipelineCacheKey, std::unique_ptr<ComputePipeline>> compute_cache;
+ ankerl::unordered_dense::map<GraphicsPipelineCacheKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
ShaderPools main_pools;
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp
index b9ff4cd00e..c035eb7cd9 100644
--- a/src/video_core/renderer_vulkan/vk_query_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp
@@ -10,7 +10,7 @@
#include <memory>
#include <span>
#include <type_traits>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include <vector>
#include "video_core/renderer_vulkan/vk_texture_cache.h"
@@ -230,7 +230,7 @@ public:
sync_values_stash.emplace_back();
std::vector<HostSyncValues>* sync_values = &sync_values_stash.back();
sync_values->reserve(num_slots_used);
- std::unordered_map<size_t, std::pair<size_t, size_t>> offsets;
+ ankerl::unordered_dense::map<size_t, std::pair<size_t, size_t>> offsets;
resolve_buffers.clear();
size_t resolve_buffer_index = ObtainBuffer<true>(num_slots_used);
resolve_buffers.push_back(resolve_buffer_index);
@@ -412,7 +412,7 @@ private:
template <bool is_ordered, typename Func>
void ApplyBanksWideOp(std::vector<size_t>& queries, Func&& func) {
std::conditional_t<is_ordered, std::map<size_t, std::pair<size_t, size_t>>,
- std::unordered_map<size_t, std::pair<size_t, size_t>>>
+ ankerl::unordered_dense::map<size_t, std::pair<size_t, size_t>>>
indexer;
for (auto q : queries) {
auto* query = GetQuery(q);
@@ -722,7 +722,7 @@ public:
void SyncWrites() override {
CloseCounter();
- std::unordered_map<size_t, std::vector<HostSyncValues>> sync_values_stash;
+ ankerl::unordered_dense::map<size_t, std::vector<HostSyncValues>> sync_values_stash;
for (auto q : pending_sync) {
auto* query = GetQuery(q);
if (True(query->flags & VideoCommon::QueryFlagBits::IsRewritten)) {
diff --git a/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp b/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp
index f1e15595b3..1d7af349d1 100644
--- a/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp
@@ -4,7 +4,7 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <boost/container/static_vector.hpp>
diff --git a/src/video_core/renderer_vulkan/vk_render_pass_cache.h b/src/video_core/renderer_vulkan/vk_render_pass_cache.h
index 91ad4bf577..5c7b3c2aed 100644
--- a/src/video_core/renderer_vulkan/vk_render_pass_cache.h
+++ b/src/video_core/renderer_vulkan/vk_render_pass_cache.h
@@ -1,10 +1,13 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <mutex>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "video_core/surface.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
@@ -47,7 +50,7 @@ public:
private:
const Device* device{};
- std::unordered_map<RenderPassKey, vk::RenderPass> cache;
+ ankerl::unordered_dense::map<RenderPassKey, vk::RenderPass> cache;
std::mutex mutex;
};
diff --git a/src/video_core/shader_cache.h b/src/video_core/shader_cache.h
index 244146fe52..7d93a542ef 100644
--- a/src/video_core/shader_cache.h
+++ b/src/video_core/shader_cache.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
@@ -10,7 +10,7 @@
#include <memory>
#include <mutex>
#include <span>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include <vector>
@@ -148,8 +148,8 @@ private:
mutable std::mutex lookup_mutex;
std::mutex invalidation_mutex;
- std::unordered_map<u64, std::unique_ptr<Entry>> lookup_cache;
- std::unordered_map<u64, std::vector<Entry*>> invalidation_cache;
+ ankerl::unordered_dense::map<u64, std::unique_ptr<Entry>> lookup_cache;
+ ankerl::unordered_dense::map<u64, std::vector<Entry*>> invalidation_cache;
std::vector<std::unique_ptr<ShaderInfo>> storage;
std::vector<Entry*> marked_for_removal;
};
diff --git a/src/video_core/shader_environment.h b/src/video_core/shader_environment.h
index c5bd0e7339..183b6b903b 100644
--- a/src/video_core/shader_environment.h
+++ b/src/video_core/shader_environment.h
@@ -14,7 +14,7 @@
#include <optional>
#include <span>
#include <type_traits>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -79,10 +79,10 @@ protected:
GPUVAddr program_base{};
std::vector<u64> code;
- std::unordered_map<u32, Shader::TextureType> texture_types;
- std::unordered_map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
- std::unordered_map<u64, u32> cbuf_values;
- std::unordered_map<u64, Shader::ReplaceConstant> cbuf_replacements;
+ ankerl::unordered_dense::map<u32, Shader::TextureType> texture_types;
+ ankerl::unordered_dense::map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
+ ankerl::unordered_dense::map<u64, u32> cbuf_values;
+ ankerl::unordered_dense::map<u64, Shader::ReplaceConstant> cbuf_replacements;
u32 local_memory_size{};
u32 texture_bound{};
@@ -201,10 +201,10 @@ public:
private:
std::vector<u64> code;
- std::unordered_map<u32, Shader::TextureType> texture_types;
- std::unordered_map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
- std::unordered_map<u64, u32> cbuf_values;
- std::unordered_map<u64, Shader::ReplaceConstant> cbuf_replacements;
+ ankerl::unordered_dense::map<u32, Shader::TextureType> texture_types;
+ ankerl::unordered_dense::map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
+ ankerl::unordered_dense::map<u64, u32> cbuf_values;
+ ankerl::unordered_dense::map<u64, Shader::ReplaceConstant> cbuf_replacements;
std::array<u32, 3> workgroup_size{};
u32 local_memory_size{};
u32 shared_memory_size{};
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 2564a67780..0ed65e29e9 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -9,7 +9,7 @@
#include <limits>
#include <optional>
#include <bit>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <boost/container/small_vector.hpp>
#include "common/alignment.h"
@@ -1989,8 +1989,8 @@ SamplerId TextureCache<P>::FindSampler(const TSCEntry& config) {
}
const auto [pair, is_new] = channel_state->samplers.try_emplace(config);
if (is_new) {
- EnforceSamplerBudget();
pair->second = slot_samplers.insert(runtime, config);
+ EnforceSamplerBudget();
}
return pair->second;
}
@@ -2035,7 +2035,7 @@ void TextureCache<P>::TrimInactiveSamplers(size_t budget) {
}
set.insert(id);
};
- std::unordered_set<SamplerId> active;
+ ankerl::unordered_dense::set<SamplerId> active;
active.reserve(channel_state->graphics_sampler_ids.size() +
channel_state->compute_sampler_ids.size());
for (const SamplerId id : channel_state->graphics_sampler_ids) {
@@ -2363,9 +2363,7 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
image.flags &= ~ImageFlagBits::BadOverlap;
lru_cache.Free(image.lru_index);
const auto& clear_page_table =
- [image_id](u64 page,
- std::unordered_map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>&
- selected_page_table) {
+ [image_id](u64 page, ankerl::unordered_dense::map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>& selected_page_table) {
const auto page_it = selected_page_table.find(page);
if (page_it == selected_page_table.end()) {
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS);
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h
index 42f1a158d9..cff300da8f 100644
--- a/src/video_core/texture_cache/texture_cache_base.h
+++ b/src/video_core/texture_cache/texture_cache_base.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
@@ -12,8 +12,9 @@
#include <mutex>
#include <span>
#include <type_traits>
+// TODO: find out which don't require stable iters
#include <unordered_map>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include <boost/container/small_vector.hpp>
#include <queue>
@@ -66,7 +67,7 @@ struct AsyncDecodeContext {
std::atomic_bool complete;
};
-using TextureCacheGPUMap = std::unordered_map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>;
+using TextureCacheGPUMap = ankerl::unordered_dense::map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>;
class TextureCacheChannelInfo : public ChannelInfo {
public:
@@ -85,6 +86,7 @@ public:
std::vector<SamplerId> compute_sampler_ids;
std::vector<ImageViewId> compute_image_view_ids;
+ // TODO: still relies on bad iterators :(
std::unordered_map<TICEntry, ImageViewId> image_views;
std::unordered_map<TSCEntry, SamplerId> samplers;
@@ -454,10 +456,9 @@ private:
RenderTargets render_targets;
- std::unordered_map<RenderTargets, FramebufferId> framebuffers;
-
- std::unordered_map<u64, std::vector<ImageMapId>, Common::IdentityHash<u64>> page_table;
- std::unordered_map<ImageId, boost::container::small_vector<ImageViewId, 16>> sparse_views;
+ ankerl::unordered_dense::map<RenderTargets, FramebufferId> framebuffers;
+ ankerl::unordered_dense::map<u64, std::vector<ImageMapId>, Common::IdentityHash<u64>> page_table;
+ ankerl::unordered_dense::map<ImageId, boost::container::small_vector<ImageViewId, 16>> sparse_views;
DAddr virtual_invalid_space{};
@@ -514,7 +515,7 @@ private:
DelayedDestructionRing<ImageView, TICKS_TO_DESTROY> sentenced_image_view;
DelayedDestructionRing<Framebuffer, TICKS_TO_DESTROY> sentenced_framebuffers;
- std::unordered_map<GPUVAddr, ImageAllocId> image_allocs_table;
+ ankerl::unordered_dense::map<GPUVAddr, ImageAllocId> image_allocs_table;
Common::ScratchBuffer<u8> swizzle_data_buffer;
Common::ScratchBuffer<u8> unswizzle_data_buffer;
@@ -531,17 +532,17 @@ private:
// Join caching
boost::container::small_vector<ImageId, 4> join_overlap_ids;
- std::unordered_set<ImageId> join_overlaps_found;
+ ankerl::unordered_dense::set<ImageId> join_overlaps_found;
boost::container::small_vector<ImageId, 4> join_left_aliased_ids;
boost::container::small_vector<ImageId, 4> join_right_aliased_ids;
- std::unordered_set<ImageId> join_ignore_textures;
+ ankerl::unordered_dense::set<ImageId> join_ignore_textures;
boost::container::small_vector<ImageId, 4> join_bad_overlap_ids;
struct JoinCopy {
bool is_alias;
ImageId id;
};
boost::container::small_vector<JoinCopy, 4> join_copies_to_do;
- std::unordered_map<ImageId, size_t> join_alias_indices;
+ ankerl::unordered_dense::map<ImageId, size_t> join_alias_indices;
};
} // namespace VideoCommon
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index f06551b91e..8cb2ebfb62 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -9,7 +9,7 @@
#include <chrono>
#include <optional>
#include <thread>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <utility>
#include <vector>
@@ -145,7 +145,7 @@ VkFormatFeatureFlags GetFormatFeatures(VkFormatProperties properties, FormatType
}
}
-std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(vk::PhysicalDevice physical) {
+ankerl::unordered_dense::map<VkFormat, VkFormatProperties> GetFormatProperties(vk::PhysicalDevice physical) {
static constexpr std::array formats{
VK_FORMAT_A1R5G5B5_UNORM_PACK16,
VK_FORMAT_A2B10G10R10_SINT_PACK32,
@@ -287,7 +287,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(vk::Physica
VK_FORMAT_R8_USCALED,
VK_FORMAT_S8_UINT,
};
- std::unordered_map<VkFormat, VkFormatProperties> format_properties;
+ ankerl::unordered_dense::map<VkFormat, VkFormatProperties> format_properties;
for (const auto format : formats) {
format_properties.emplace(format, physical.GetFormatProperties(format));
}
@@ -295,7 +295,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(vk::Physica
}
#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
-void OverrideBcnFormats(std::unordered_map<VkFormat, VkFormatProperties>& format_properties) {
+void OverrideBcnFormats(ankerl::unordered_dense::map<VkFormat, VkFormatProperties>& format_properties) {
// These properties are extracted from Adreno driver 512.687.0
constexpr VkFormatFeatureFlags tiling_features{VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
VK_FORMAT_FEATURE_BLIT_SRC_BIT |
@@ -1612,7 +1612,7 @@ void Device::CollectToolingInfo() {
std::vector<VkDeviceQueueCreateInfo> Device::GetDeviceQueueCreateInfos() const {
static constexpr float QUEUE_PRIORITY = 1.0f;
- std::unordered_set<u32> unique_queue_families{graphics_family, present_family};
+ ankerl::unordered_dense::set<u32> unique_queue_families{graphics_family, present_family};
std::vector<VkDeviceQueueCreateInfo> queue_cis;
queue_cis.reserve(unique_queue_families.size());
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index 73a232ddee..7d738a81df 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -10,7 +10,7 @@
#include <set>
#include <span>
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <vector>
#include "common/common_types.h"
@@ -1074,7 +1074,7 @@ private:
std::vector<size_t> valid_heap_memory; ///< Heaps used.
/// Format properties dictionary.
- std::unordered_map<VkFormat, VkFormatProperties> format_properties;
+ ankerl::unordered_dense::map<VkFormat, VkFormatProperties> format_properties;
/// Nsight Aftermath GPU crash tracker
std::unique_ptr<NsightAftermathTracker> nsight_aftermath_tracker;
diff --git a/src/yuzu/compatibility_list.h b/src/yuzu/compatibility_list.h
index c0675d7936..bb1e4b6205 100644
--- a/src/yuzu/compatibility_list.h
+++ b/src/yuzu/compatibility_list.h
@@ -1,16 +1,19 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <QString>
#include "common/common_types.h"
-using CompatibilityList = std::unordered_map<std::string, std::pair<QString, QString>>;
+using CompatibilityList = ankerl::unordered_dense::map<std::string, std::pair<QString, QString>>;
CompatibilityList::const_iterator FindMatchingCompatibilityEntry(
const CompatibilityList& compatibility_list, u64 program_id);
diff --git a/src/yuzu/configuration/input_profiles.h b/src/yuzu/configuration/input_profiles.h
index 67f823ec83..326e7f9a1d 100644
--- a/src/yuzu/configuration/input_profiles.h
+++ b/src/yuzu/configuration/input_profiles.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
@@ -7,7 +7,7 @@
#pragma once
#include <string>
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include "qt_common/config/qt_config.h"
@@ -35,5 +35,5 @@ public:
private:
bool ProfileExistsInMap(const std::string& profile_name) const;
- std::unordered_map<std::string, std::unique_ptr<QtConfig>> map_profiles;
+ ankerl::unordered_dense::map<std::string, std::unique_ptr<QtConfig>> map_profiles;
};
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp
index b081fff6b6..d6550a2c81 100644
--- a/src/yuzu/loading_screen.cpp
+++ b/src/yuzu/loading_screen.cpp
@@ -1,7 +1,10 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include <unordered_map>
+#include <ankerl/unordered_dense.h>
#include <QBuffer>
#include <QByteArray>
#include <QGraphicsOpacityEffect>
diff --git a/src/yuzu/loading_screen.h b/src/yuzu/loading_screen.h
index 17045595d3..a39d5f6605 100644
--- a/src/yuzu/loading_screen.h
+++ b/src/yuzu/loading_screen.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -77,8 +80,8 @@ private:
std::unique_ptr<QPropertyAnimation> fadeout_animation;
// Definitions for the differences in text and styling for each stage
- std::unordered_map<VideoCore::LoadCallbackStage, const char*> progressbar_style;
- std::unordered_map<VideoCore::LoadCallbackStage, QString> stage_translations;
+ ankerl::unordered_dense::map<VideoCore::LoadCallbackStage, const char*> progressbar_style;
+ ankerl::unordered_dense::map<VideoCore::LoadCallbackStage, QString> stage_translations;
// newly generated shaders are added to the end of the file, so when loading and compiling
// shaders, it will start quickly but end slow if new shaders were added since previous launch.
diff --git a/src/yuzu/multiplayer/chat_room.h b/src/yuzu/multiplayer/chat_room.h
index e9eb48e824..a94683ef58 100644
--- a/src/yuzu/multiplayer/chat_room.h
+++ b/src/yuzu/multiplayer/chat_room.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -6,8 +6,7 @@
#pragma once
#include <memory>
-#include <unordered_map>
-#include <unordered_set>
+#include <ankerl/unordered_dense.h>
#include <QDialog>
#include <QSortFilterProxyModel>
#include <QStandardItemModel>
@@ -66,8 +65,8 @@ private:
bool has_mod_perms = false;
QStandardItemModel* player_list;
std::unique_ptr<Ui::ChatRoom> ui;
- std::unordered_set<std::string> block_list;
- std::unordered_map<std::string, QPixmap> icon_cache;
+ ankerl::unordered_dense::set<std::string> block_list;
+ ankerl::unordered_dense::map<std::string, QPixmap> icon_cache;
};
Q_DECLARE_METATYPE(Network::ChatEntry);