Browse Source

Speed up histogramming by changing data structure

Since we no longer rely on the map's order, use unordered_map.
pull/1192/head
Andrew Waterman 4 years ago
parent
commit
d6e5a0ed89
  1. 2
      riscv/processor.h

2
riscv/processor.h

@ -295,7 +295,7 @@ private:
std::vector<bool> impl_table;
std::vector<insn_desc_t> instructions;
std::map<reg_t,uint64_t> pc_histogram;
std::unordered_map<reg_t,uint64_t> pc_histogram;
static const size_t OPCODE_CACHE_SIZE = 8191;
insn_desc_t opcode_cache[OPCODE_CACHE_SIZE];

Loading…
Cancel
Save