constant_pool: Use tsl::robin_map
rather than unordered_map
Finding a much more drastic improvement with `robin_map`. `map`: ``` [master] % hyperfine -r 100 "./dynarmic_tests --durations yes" Benchmark 1: ./dynarmic_tests --durations yes Time (mean ± σ): 567.0 ms ± 6.9 ms [User: 513.1 ms, System: 53.2 ms] Range (min … max): 554.4 ms … 588.1 ms 100 runs ``` `unordered_map`: ``` [opt_const_pool] % hyperfine -r 100 "./dynarmic_tests --durations yes" Benchmark 1: ./dynarmic_tests --durations yes Time (mean ± σ): 561.1 ms ± 4.5 ms [User: 508.1 ms, System: 52.3 ms] Range (min … max): 552.6 ms … 574.2 ms 100 runs ``` `tsl::robin_map`: ``` [opt_const_pool] % hyperfine -r 100 "./dynarmic_tests --durations yes" Benchmark 1: ./dynarmic_tests --durations yes Time (mean ± σ): 553.5 ms ± 5.6 ms [User: 500.7 ms, System: 52.1 ms] Range (min … max): 545.7 ms … 569.3 ms 100 runs ```
This commit is contained in:
parent
e57bb0569a
commit
ad5465d6ce
1 changed files with 2 additions and 2 deletions
|
@ -6,9 +6,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <bit>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include <tsl/robin_map.h>
|
||||
#include <xbyak/xbyak.h>
|
||||
|
||||
#include "dynarmic/common/common_types.h"
|
||||
|
@ -36,7 +36,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
std::unordered_map<std::pair<u64, u64>, void*, ConstantHash> constant_info;
|
||||
tsl::robin_map<std::pair<u64, u64>, void*, ConstantHash> constant_info;
|
||||
|
||||
BlockOfCode& code;
|
||||
size_t pool_size;
|
||||
|
|
Loading…
Reference in a new issue