mirror of
https://github.com/xmrig/xmrig.git
synced 2024-10-30 04:57:39 +00:00
soft_aes: fix previous optimization
the best order of hash/fill/prefetch depends on hw/soft AES only hw AES is faster after previous optimization
This commit is contained in:
parent
e4929d7c06
commit
9be3b69109
1 changed files with 18 additions and 6 deletions
|
@ -260,14 +260,26 @@ void hashAndFillAes1Rx4(void *scratchpad, size_t scratchpadSize, void *hash, voi
|
|||
rx_store_vec_i128((rx_vec_i128*)scratchpadPtr + k * 4 + 2, fill_state2); \
|
||||
rx_store_vec_i128((rx_vec_i128*)scratchpadPtr + k * 4 + 3, fill_state3);
|
||||
|
||||
HASH_STATE(0);
|
||||
HASH_STATE(1);
|
||||
switch(softAes) {
|
||||
case 0:
|
||||
HASH_STATE(0);
|
||||
HASH_STATE(1);
|
||||
|
||||
FILL_STATE(0);
|
||||
FILL_STATE(1);
|
||||
FILL_STATE(0);
|
||||
FILL_STATE(1);
|
||||
|
||||
rx_prefetch_t0(prefetchPtr);
|
||||
rx_prefetch_t0(prefetchPtr + 64);
|
||||
rx_prefetch_t0(prefetchPtr);
|
||||
rx_prefetch_t0(prefetchPtr + 64);
|
||||
break;
|
||||
default:
|
||||
HASH_STATE(0);
|
||||
FILL_STATE(0);
|
||||
rx_prefetch_t0(prefetchPtr);
|
||||
|
||||
HASH_STATE(1);
|
||||
FILL_STATE(1);
|
||||
rx_prefetch_t0(prefetchPtr + 64);
|
||||
}
|
||||
|
||||
scratchpadPtr += 128;
|
||||
prefetchPtr += 128;
|
||||
|
|
Loading…
Reference in a new issue