1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-14 16:36:41 +00:00

Tweak cpu cache deletion policy values (#433)

* Tweak cpu cache deletion policy values

* Address PR feedback
This commit is contained in:
gdkchan 2018-10-07 23:40:37 -03:00 committed by GitHub
parent 625fc8c0e0
commit 74ca82c534
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,9 +8,14 @@ namespace ChocolArm64
{ {
class ATranslatorCache class ATranslatorCache
{ {
private const int MaxTotalSize = 2 * 1024 * 256; //Maximum size of the cache, in bytes, measured in ARM code size.
private const int MaxTimeDelta = 30000; private const int MaxTotalSize = 4 * 1024 * 256;
private const int MinCallCountForUpdate = 1000;
//Minimum time required in milliseconds for a method to be eligible for deletion.
private const int MinTimeDelta = 2 * 60000;
//Minimum number of calls required to update the timestamp.
private const int MinCallCountForUpdate = 250;
private class CacheBucket private class CacheBucket
{ {
@ -134,7 +139,7 @@ namespace ChocolArm64
int TimeDelta = RingDelta(Bucket.Timestamp, Timestamp); int TimeDelta = RingDelta(Bucket.Timestamp, Timestamp);
if ((uint)TimeDelta <= (uint)MaxTimeDelta) if ((uint)TimeDelta <= (uint)MinTimeDelta)
{ {
break; break;
} }