Optimize inner mining loop
This commit is contained in:
@@ -1079,6 +1079,9 @@ void static RandomXMiner()
|
|||||||
randomx_dataset *randomxDataset = randomx_alloc_dataset(flags);
|
randomx_dataset *randomxDataset = randomx_alloc_dataset(flags);
|
||||||
rxdebug("%s: created dataset\n");
|
rxdebug("%s: created dataset\n");
|
||||||
|
|
||||||
|
auto datasetItemCount = randomx_dataset_item_count();
|
||||||
|
rxdebug("%s: dataset items=%lu\n", datasetItemCount);
|
||||||
|
|
||||||
if( randomxDataset == nullptr) {
|
if( randomxDataset == nullptr) {
|
||||||
LogPrintf("%s: allocating randomx dataset failed!\n", __func__);
|
LogPrintf("%s: allocating randomx dataset failed!\n", __func__);
|
||||||
return;
|
return;
|
||||||
@@ -1166,9 +1169,6 @@ void static RandomXMiner()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto datasetItemCount = randomx_dataset_item_count();
|
|
||||||
rxdebug("%s: dataset items=%lu\n", datasetItemCount);
|
|
||||||
|
|
||||||
//TODO: this is hardcoded to use 2 threads instead of the number of mining threads
|
//TODO: this is hardcoded to use 2 threads instead of the number of mining threads
|
||||||
rxdebug("%s: initializing dataset with 2 threads\n");
|
rxdebug("%s: initializing dataset with 2 threads\n");
|
||||||
std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2);
|
std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user