mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-11 17:32:47 -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:
@@ -33,9 +33,14 @@
|
||||
struct cryptonight_ctx;
|
||||
|
||||
|
||||
namespace xmrig { namespace astrobwt {
|
||||
namespace xmrig {
|
||||
|
||||
bool astrobwt_dero(const void* input_data, uint32_t input_size, void* scratchpad, uint8_t* output_hash, int stage2_max_size);
|
||||
class Job;
|
||||
|
||||
namespace astrobwt {
|
||||
|
||||
bool init(const Job&);
|
||||
bool astrobwt_dero(const void* input_data, uint32_t input_size, void* scratchpad, uint8_t* output_hash, int stage2_max_size, bool avx2);
|
||||
|
||||
template<Algorithm::Id ALGO>
|
||||
void single_hash(const uint8_t* input, size_t size, uint8_t* output, cryptonight_ctx** ctx, uint64_t);
|
||||
@@ -44,4 +49,4 @@ template<>
|
||||
void single_hash<Algorithm::ASTROBWT_DERO>(const uint8_t* input, size_t size, uint8_t* output, cryptonight_ctx** ctx, uint64_t);
|
||||
|
||||
|
||||
}} // namespace xmrig::argon2
|
||||
}} // namespace xmrig::astrobwt
|
||||
|
||||
Reference in New Issue
Block a user