Optimized RandomX JIT compiler

Hashrate improved by 0.5-1.5% depending on RandomX version and CPU.
This commit is contained in:
SChernykh 2019-08-27 20:18:56 +02:00
parent 21a56c9cbf
commit 8b84d7650b
3 changed files with 433 additions and 278 deletions

View file

@ -77,13 +77,13 @@ namespace randomx {
void setImm32(uint32_t val) {
return store32(&imm32, val);
}
int getModMem() const {
return mod % 4; //bits 0-1
uint32_t getModMem() const {
return mod & 3; //bits 0-1
}
int getModShift() const {
return (mod >> 2) % 4; //bits 2-3
uint32_t getModShift() const {
return (mod >> 2) & 3; //bits 2-3
}
int getModCond() const {
uint32_t getModCond() const {
return mod >> 4; //bits 4-7
}
void setMod(uint8_t val) {