RandomX: added Blake2 AVX2 version

+0.1% speedup on AMD Zen2/Zen3 and Intel CPUs which support AVX2.
This commit is contained in:
SChernykh 2022-08-25 20:39:54 +02:00
parent b2d9dab2e3
commit 63e21dfe63
14 changed files with 752 additions and 29 deletions

View file

@ -25,11 +25,6 @@
#include "crypto/rx/RxVm.h"
#if defined(XMRIG_FEATURE_SSE4_1)
extern "C" uint32_t rx_blake2b_use_sse41;
#endif
randomx_vm *xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool softAes, const Assembly &assembly, uint32_t node)
{
int flags = 0;
@ -51,10 +46,6 @@ randomx_vm *xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool so
flags |= RANDOMX_FLAG_AMD;
}
# if defined(XMRIG_FEATURE_SSE4_1)
rx_blake2b_use_sse41 = Cpu::info()->has(ICpuInfo::FLAG_SSE41) ? 1 : 0;
# endif
return randomx_create_vm(static_cast<randomx_flags>(flags), !dataset->get() ? dataset->cache()->get() : nullptr, dataset->get(), scratchpad, node);
}