mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-11 05:14:40 +00:00
RandomX: optimized soft AES code
Unrolled loop was 5-10% slower depending on CPU.
This commit is contained in:
parent
dfab81e9fa
commit
7b4f768114
1 changed files with 9 additions and 6 deletions
|
@ -270,19 +270,22 @@ void hashAndFillAes1Rx4(void *scratchpad, size_t scratchpadSize, void *hash, voi
|
||||||
|
|
||||||
rx_prefetch_t0(prefetchPtr);
|
rx_prefetch_t0(prefetchPtr);
|
||||||
rx_prefetch_t0(prefetchPtr + 64);
|
rx_prefetch_t0(prefetchPtr + 64);
|
||||||
|
|
||||||
|
scratchpadPtr += 128;
|
||||||
|
prefetchPtr += 128;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
HASH_STATE(0);
|
HASH_STATE(0);
|
||||||
FILL_STATE(0);
|
FILL_STATE(0);
|
||||||
rx_prefetch_t0(prefetchPtr);
|
rx_prefetch_t0(prefetchPtr);
|
||||||
|
|
||||||
HASH_STATE(1);
|
scratchpadPtr += 64;
|
||||||
FILL_STATE(1);
|
prefetchPtr += 64;
|
||||||
rx_prefetch_t0(prefetchPtr + 64);
|
|
||||||
}
|
|
||||||
|
|
||||||
scratchpadPtr += 128;
|
break;
|
||||||
prefetchPtr += 128;
|
}
|
||||||
}
|
}
|
||||||
prefetchPtr = (const char*) scratchpad;
|
prefetchPtr = (const char*) scratchpad;
|
||||||
scratchpadEnd += PREFETCH_DISTANCE;
|
scratchpadEnd += PREFETCH_DISTANCE;
|
||||||
|
|
Loading…
Reference in a new issue