Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evict registers from the cache based on LRU. #949

Merged
merged 1 commit into from Sep 3, 2014

Conversation

comex
Copy link
Contributor

@comex comex commented Sep 3, 2014

The old method would always evict the first suitable register, i.e. the
same register every time once the cache got full. The cache doesn't get
full terribly often, but the result is pathological...

@comex
Copy link
Contributor Author

comex commented Sep 3, 2014

update: fixed last_used_quantum = false, whoops

@@ -45,6 +46,8 @@ class RegCache

Gen::XEmitter *emit;

u32 cur_use_quantum;

This comment was marked as off-topic.

This comment was marked as off-topic.

@phire
Copy link
Member

phire commented Sep 3, 2014

This looks like an improvement.

@JMC47 This could potentially have a performance boost on some games, could we get some benchmarks?

The old method would always evict the first suitable register, i.e. the
same register every time once the cache got full.  The cache doesn't get
terribly often, but the result is pathological...
@skidau
Copy link
Contributor

skidau commented Sep 3, 2014

Looks good to me.

comex added a commit that referenced this pull request Sep 3, 2014
Evict registers from the cache based on LRU.
@comex comex merged commit 51a5311 into dolphin-emu:master Sep 3, 2014
@comex comex deleted the eviction-policy branch September 3, 2014 06:22
@degasus
Copy link
Member

degasus commented Sep 3, 2014

@comex We should also try to flushread_only cached registers first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants