Skip to content

Commit 0ef6faa

Browse files
committed
[externals] use ankerl::unordered_dense over tsl
ankerl::unordered_dense is faster on average and has less memory usage than tsl::robin_map. It is pretty significantly faster than std but we'll keep that as is for now. Obviously, this will need a lot of testing. Signed-off-by: crueter <crueter@eden-emu.dev>
1 parent 900c179 commit 0ef6faa

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

.gitmodules

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
[submodule "External/Catch2"]
3333
path = External/Catch2
3434
url = https://github.com/catchorg/Catch2.git
35-
[submodule "External/robin-map"]
36-
shallow = true
37-
path = External/robin-map
38-
url = https://github.com/FEX-Emu/robin-map.git
3935
[submodule "External/Vulkan-Headers"]
4036
shallow = true
4137
path = External/Vulkan-Headers
@@ -49,3 +45,6 @@
4945
[submodule "External/range-v3"]
5046
path = External/range-v3
5147
url = https://github.com/ericniebler/range-v3.git
48+
[submodule "External/unordered_dense"]
49+
path = External/unordered_dense
50+
url = https://github.com/martinus/unordered_dense.git

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ set(CMAKE_LINKER_FLAGS_RELEASE "${CMAKE_LINKER_FLAGS_RELEASE} -fomit-frame-point
306306
## Modules ##
307307
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules/)
308308

309-
include_directories(External/robin-map/include/)
309+
include_directories(External/unordered_dense/include/)
310310

311311
include(CTest)
312312
if (BUILD_TESTING OR ENABLE_VIXL_DISASSEMBLER OR ENABLE_VIXL_SIMULATOR)

External/robin-map

Lines changed: 0 additions & 1 deletion
This file was deleted.

External/unordered_dense

Submodule unordered_dense added at 3234af2

FEXCore/include/FEXCore/fextl/robin_map.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#pragma once
33
#include <FEXCore/fextl/allocator.h>
44

5-
#include <tsl/robin_map.h>
5+
#include <ankerl/unordered_dense.h>
66

77
namespace fextl {
8-
template<class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = fextl::FEXAlloc<std::pair<const Key, T>>>
9-
using robin_map = tsl::robin_map<Key, T, Hash, KeyEqual, Allocator>;
8+
template<class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = fextl::FEXAlloc<std::pair<Key, T>>>
9+
using robin_map = ankerl::unordered_dense::map<Key, T, Hash, KeyEqual, Allocator>;
1010
}

FEXCore/include/FEXCore/fextl/robin_set.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#pragma once
33
#include <FEXCore/fextl/allocator.h>
44

5-
#include <tsl/robin_set.h>
5+
#include <ankerl/unordered_dense.h>
66

77
namespace fextl {
88
template<class Key, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = fextl::FEXAlloc<Key>>
9-
using robin_set = tsl::robin_set<Key, Hash, KeyEqual, Allocator>;
9+
using robin_set = ankerl::unordered_dense::set<Key, Hash, KeyEqual, Allocator>;
1010
}

0 commit comments

Comments
 (0)