Skip to content

Use std::unordered_map for CacheTagArray class #225

Closed
pavelkryukov opened this issue Nov 16, 2017 · 1 comment
Closed

Use std::unordered_map for CacheTagArray class #225

pavelkryukov opened this issue Nov 16, 2017 · 1 comment
Assignees
Labels
2 Small features, tests coverage, simple laboratory works code Enhances infrastructure or refines, Requires almost no knowledge in CPU microarchitecture. S2 — Caches To solve the issue, you NEED knowledge about caches. OOO hierarchy etc.

Comments

@pavelkryukov
Copy link
Member

Currently the only way to find a value in CacheTagArray is iterating the std::vector from begin to end, so we do O(ways) here. If we used std::unordered_map, we would do this in O(1).

@pavelkryukov pavelkryukov added 2 Small features, tests coverage, simple laboratory works code Enhances infrastructure or refines, Requires almost no knowledge in CPU microarchitecture. S2 — Caches To solve the issue, you NEED knowledge about caches. OOO hierarchy etc. labels Nov 16, 2017
@pavelkryukov pavelkryukov added this to the Simulation Speed milestone Nov 16, 2017
@denislos denislos self-assigned this Nov 17, 2017
@pavelkryukov
Copy link
Member Author

@denislos Denis, please do not self-assign on more than 2 issues simultaneously. First of all, it's better to stay focused, secondly, it is not very fair to other guys.

pavelkryukov pushed a commit that referenced this issue Dec 6, 2017
These changes speed up cache lookup and LRU updates. As a result, miss rate study is performed 6 times faster
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2 Small features, tests coverage, simple laboratory works code Enhances infrastructure or refines, Requires almost no knowledge in CPU microarchitecture. S2 — Caches To solve the issue, you NEED knowledge about caches. OOO hierarchy etc.
Projects
None yet
Development

No branches or pull requests

2 participants