RandomX: added SSE4.1-optimized Blake2b
+0.15% on `rx/0` +0.3% on `rx/wow`
This commit is contained in:
parent
0f09883429
commit
4a9db89527
7 changed files with 623 additions and 9 deletions
|
@ -31,6 +31,11 @@
|
|||
#include "crypto/rx/RxVm.h"
|
||||
|
||||
|
||||
#if defined(_M_X64) || defined(__x86_64__)
|
||||
extern "C" uint32_t rx_blake2b_use_sse41;
|
||||
#endif
|
||||
|
||||
|
||||
randomx_vm* xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool softAes, xmrig::Assembly assembly, uint32_t node)
|
||||
{
|
||||
int flags = 0;
|
||||
|
@ -55,6 +60,10 @@ randomx_vm* xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool so
|
|||
flags |= RANDOMX_FLAG_AMD;
|
||||
}
|
||||
|
||||
# if defined(_M_X64) || defined(__x86_64__)
|
||||
rx_blake2b_use_sse41 = Cpu::info()->has(ICpuInfo::FLAG_SSE41) ? 1 : 0;
|
||||
# endif
|
||||
|
||||
return randomx_create_vm(static_cast<randomx_flags>(flags), dataset->cache() ? dataset->cache()->get() : nullptr, dataset->get(), scratchpad, node);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue