mirror of
https://github.com/xmrig/xmrig.git
synced 2026-02-01 17:53:03 -05:00
AVX2 optimized code for AstroBWT
Added "astrobwt-avx2" parameter in config.json, it's turned off ("false") by default.
4-5% speedup on CPUs with proper AVX2 support (AMD Ryzen starting with Zen2, Intel Core starting with Haswell).
There will be no speedup on the following CPUs:
- Intel Pentium/Celeron don't support AVX2
- AMD Zen/Zen+ have only half-speed AVX
GCC compiled version is faster without AVX2, MSVC compiled version is faster with AVX2
This commit is contained in:
@@ -81,6 +81,7 @@ xmrig::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :
|
||||
m_yield(data.yield),
|
||||
m_av(data.av()),
|
||||
m_astrobwtMaxSize(data.astrobwtMaxSize * 1000),
|
||||
m_astrobwtAVX2(data.astrobwtAVX2),
|
||||
m_miner(data.miner),
|
||||
m_ctx()
|
||||
{
|
||||
@@ -262,7 +263,7 @@ void xmrig::CpuWorker<N>::start()
|
||||
{
|
||||
# ifdef XMRIG_ALGO_ASTROBWT
|
||||
if (job.algorithm().family() == Algorithm::ASTROBWT) {
|
||||
if (!astrobwt::astrobwt_dero(m_job.blob(), job.size(), m_ctx[0]->memory, m_hash, m_astrobwtMaxSize))
|
||||
if (!astrobwt::astrobwt_dero(m_job.blob(), job.size(), m_ctx[0]->memory, m_hash, m_astrobwtMaxSize, m_astrobwtAVX2))
|
||||
valid = false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user