RandomX JIT refactoring
- Smaller memory footprint - A bit faster overall
This commit is contained in:
parent
92810ad761
commit
abb3340cc7
9 changed files with 374 additions and 428 deletions
|
@ -116,17 +116,17 @@ static void getResults(JobBundle &bundle, std::vector<JobResult> &results, uint3
|
|||
return;
|
||||
}
|
||||
|
||||
auto vm = new RxVm(dataset, memory->scratchpad(), !hwAES, Assembly::NONE, 0);
|
||||
auto vm = RxVm::Create(dataset, memory->scratchpad(), !hwAES, Assembly::NONE, 0);
|
||||
|
||||
for (uint32_t nonce : bundle.nonces) {
|
||||
*bundle.job.nonce() = nonce;
|
||||
|
||||
randomx_calculate_hash(vm->get(), bundle.job.blob(), bundle.job.size(), hash);
|
||||
randomx_calculate_hash(vm, bundle.job.blob(), bundle.job.size(), hash);
|
||||
|
||||
checkHash(bundle, results, nonce, hash, errors);
|
||||
}
|
||||
|
||||
delete vm;
|
||||
RxVm::Destroy(vm);
|
||||
# endif
|
||||
}
|
||||
else if (algorithm.family() == Algorithm::ARGON2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue