Merge pull request #2214 from SChernykh/cn-heavy-opt

Optimized cn-heavy
This commit is contained in:
xmrig 2021-03-28 09:56:22 +07:00 committed by GitHub
commit c5c958743e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -739,7 +739,7 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
# ifdef XMRIG_ALGO_CN_HEAVY # ifdef XMRIG_ALGO_CN_HEAVY
if (props.isHeavy()) { if (props.isHeavy()) {
int64_t n = ((int64_t*)&l0[interleaved_index<interleave>(idx0 & MASK)])[0]; int64_t n = ((int64_t*)&l0[interleaved_index<interleave>(idx0 & MASK)])[0];
int32_t d = ((int32_t*)&l0[interleaved_index<interleave>(idx0 & MASK)])[2]; int64_t d = ((int32_t*)&l0[interleaved_index<interleave>(idx0 & MASK)])[2];
int64_t q = n / (d | 0x5); int64_t q = n / (d | 0x5);
((int64_t*)&l0[interleaved_index<interleave>(idx0 & MASK)])[0] = n ^ q; ((int64_t*)&l0[interleaved_index<interleave>(idx0 & MASK)])[0] = n ^ q;