File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ static const unsigned int QUEUE_BATCH_SIZE = 128;
2626// and there is a little bit of work done between calls to Add.
2727static void CCheckQueueSpeedPrevectorJob (benchmark::Bench& bench)
2828{
29+ if (GetNumCores () < MIN_CORES) {
30+ return ;
31+ }
32+
2933 const ECCVerifyHandle verify_handle;
3034 ECC_Start ();
3135
@@ -44,7 +48,9 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
4448 };
4549 CCheckQueue<PrevectorJob> queue {QUEUE_BATCH_SIZE};
4650 boost::thread_group tg;
47- for (auto x = 0 ; x < std::max (MIN_CORES, GetNumCores ()); ++x) {
51+ // The main thread should be count to prevent thread oversubscription, and
52+ // to decrease the variance of benchmark results.
53+ for (auto x = 0 ; x < GetNumCores () - 1 ; ++x) {
4854 tg.create_thread ([&]{queue.Thread ();});
4955 }
5056
You can’t perform that action at this time.
0 commit comments