Closed jagerman closed 5 years ago
Thank you! Will look into this today.
I see a huge amount of work done here. Thank you again.
Is this possible to improve switching time between different RX variants?
multiHashing.randomx(input, Buffer.from('000000000000000100000000000000000000000f000000042000000000000000', 'hex'), 17);
multiHashing.randomx(input, Buffer.from('000000000000000100000000000000000000000f000000042000000000000000', 'hex'), 18);
Takes ages to execute if we put this in loop.
Maybe do not use RANDOMX_FLAG_JIT to lower memory usage and use separate caches for each RX variant?
OK, looks like removing RANDOMX_FLAG_JIT is not a good idea for perf. So it seems your solution is actually the best one unless user will want rapid switches between RX variants.
Turns out that this switch performance can be still improved by storing cache/vm separately for each RX variant. Will going to accept your pull request (thank you again) and will apply extra patches/tests on top of it.
This replaces the RandomWOW support with a copy of xmrig's RandomX support (from the upcoming
evo
branch) which supports multiple configurations at runtime.This replaces the "random_wow" algorithm with a "randomx" algorithm that takes variants (like the cryptonight algorithms). Variant 0 (the default when specifying no variant) is Monero's RandomX; variants 17 and 18 (using xmrig's variant values) are the RandomWOW and RandomXL (Loki) variants.
Fixes #31