mirror of
https://github.com/wownero/RandomX.git
synced 2026-10-17 23:41:39 +02:00
Add Dataset prefetch in interpreted VM (#52)
- to formally match the specification - a small increase in interpreted mining speed (~4%)
This commit is contained in:
@@ -246,6 +246,7 @@ namespace randomx {
|
||||
|
||||
mem.mx ^= r[config.readReg2] ^ r[config.readReg3];
|
||||
mem.mx &= CacheLineAlignMask;
|
||||
datasetPrefetch(datasetOffset + mem.mx);
|
||||
datasetRead(datasetOffset + mem.ma, r);
|
||||
std::swap(mem.mx, mem.ma);
|
||||
|
||||
@@ -279,6 +280,11 @@ namespace randomx {
|
||||
r[i] ^= datasetLine[i];
|
||||
}
|
||||
|
||||
template<class Allocator, bool softAes>
|
||||
void InterpretedVm<Allocator, softAes>::datasetPrefetch(uint64_t address) {
|
||||
rx_prefetch_nta(mem.memory + address);
|
||||
}
|
||||
|
||||
#include "instruction_weights.hpp"
|
||||
|
||||
template<class Allocator, bool softAes>
|
||||
|
||||
Reference in New Issue
Block a user