diff --git a/ChangeLog b/ChangeLog index ded64abb..e63dc369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Changes in version 12.5, 22/10/2024 +=================================== + +* Improve thread load balancing for large number of CPU cores. + Changes in version 12.4, 22/06/2024 =================================== diff --git a/src/ParallelSieve.cpp b/src/ParallelSieve.cpp index 9cb963c4..f20e634d 100644 --- a/src/ParallelSieve.cpp +++ b/src/ParallelSieve.cpp @@ -2,7 +2,7 @@ /// @file ParallelSieve.cpp /// @brief Multi-threaded prime sieve using std::async. /// -/// Copyright (C) 2023 Kim Walisch, +/// Copyright (C) 2024 Kim Walisch, /// /// This file is distributed under the BSD License. See the COPYING /// file in the top level directory. @@ -83,7 +83,7 @@ uint64_t ParallelSieve::getThreadDistance(int threads) const ASSERT(getDistance() > 0); uint64_t dist = getDistance(); - uint64_t balanced = isqrt(stop_) * 1000; + uint64_t balanced = isqrt(stop_) * 200; uint64_t unbalanced = dist / threads; uint64_t fastest = std::min(balanced, unbalanced); uint64_t iters = dist / fastest;