Mining is an "embarassingly parallel" task, and it should be threaded to take advantage of available CPU cores.
I've already made an implementation using rayon that parallelizes the core mining loop. So I'm opening this issue for tracking purposes.
This article from 2018 describes 3 strategies for parallelizing cryptocurrency mining with rayon. I've implemented the 2nd one, which is perhaps not quite as fast as the 3rd, but simpler as it uses rayon's parallel iterator functionality.
Presently mining uses only a single CPU.
Mining is an "embarassingly parallel" task, and it should be threaded to take advantage of available CPU cores.
I've already made an implementation using rayon that parallelizes the core mining loop. So I'm opening this issue for tracking purposes.
This article from 2018 describes 3 strategies for parallelizing cryptocurrency mining with rayon. I've implemented the 2nd one, which is perhaps not quite as fast as the 3rd, but simpler as it uses rayon's parallel iterator functionality.
https://www.innoq.com/en/blog/2018/06/blockchain-mining-embarrassingly-parallel/
With
--unrestricted-mining
flag all 4 cores are pegged on my dev laptop.