File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -538,7 +538,6 @@ int main(int argc, char* argv[]) {
538538 thread_count = 1 ; // Fallback to 1 if hardware_concurrency cannot determine.
539539 }
540540 else {
541- thread_count -= 2 ; // Leave 2 cores free to avoid system overload
542541 if (thread_count < 1 ) {
543542 thread_count = 1 ; // Ensure at least one thread is used
544543 }
@@ -581,13 +580,13 @@ int main(int argc, char* argv[]) {
581580 threadStorage[i].totalsims ++;
582581
583582 // Check if all items have at least mindropcount drops, and if so, break the loop to finish this thread's execution.
584- if (threadStorage[i].totalsims > 100000 && threadStorage[i].totalsims % 1000 == 0 ) {
583+ if (threadStorage[i].totalsims >= 100000 && threadStorage[i].totalsims % 1000 == 0 ) {
585584 allAboveMin = true ;
586585
587586 for (const auto & drop : threadStorage[i].totaldrops ) {
588587 long dropsLeft = mindropcount - drop.second ;
589588
590- if (dropsLeft > 0 && drop.second > 0 ) {
589+ if (dropsLeft > 0 && drop.second > 0 || drop. second == 0 && threadStorage[i]. totalsims < 1000000 ) {
591590 allAboveMin = false ;
592591 break ;
593592 }
You can’t perform that action at this time.
0 commit comments