From f2847753dcfa203050a8f98687ca3b81493999ca Mon Sep 17 00:00:00 2001 From: sunshineinabox Date: Fri, 14 Jul 2023 07:44:46 -0700 Subject: [PATCH] Maintain functionality similar to master up to 6 cores >6 cores will make more threads. --- src/ARMeilleure/Translation/Translator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ARMeilleure/Translation/Translator.cs b/src/ARMeilleure/Translation/Translator.cs index 5bd8fbb18..78521fb62 100644 --- a/src/ARMeilleure/Translation/Translator.cs +++ b/src/ARMeilleure/Translation/Translator.cs @@ -127,7 +127,7 @@ namespace ARMeilleure.Translation // etc). All threads are normal priority except from the last, which just fills as much of the last core // as the os lets it with a low priority. If we only have one rejit thread, it should be normal priority // as highCq code is performance critical. - int unboundedThreadCount = Math.Max(1, (_physicalCoreCount - 6) / 3); + int unboundedThreadCount = Math.Max(1, (_physicalCoreCount - 4)); int threadCount = Math.Min(4, unboundedThreadCount); Thread[] backgroundTranslationThreads = new Thread[threadCount];