jceminer / cn_cpu_miner

Cryptonote CPU Miner
35 stars 23 forks source link

Idea more than a issue #12

Open gritche70 opened 6 years ago

gritche70 commented 6 years ago

Hi, very good job, i test your miner on a 32 bits Via eden, and double the HR . Ok 2.8 h it's ridiculous but double of xmrig and co . in the past Via do a hardware cpu exten for hardware acceleration of SHA . it's the ACE exten name with PADLOCK . it's a ancestror of AES exten of intel . old miner use it with Script and SHA256, ( cpuminer like https://github.com/pooler/cpuminer ) is there a way to use this cpu speciality for having a gain with cryptonight Algo ?

root@wyse3:/home/jce# cat /proc/cpuinfo processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 13 model name : VIA Eden Processor 1200MHz stepping : 0 cpu MHz : 1200.000 cache size : 128 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fdiv_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge cmov pat clflush acpi mmx fxsr sse sse2 tm pni est tm2 xtpr rng rng_en ace ace_en ace2 ace2_en phe phe_en pmm pmm_en bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass bogomips : 2399.98 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 32 bits virtual power management:

jceminer commented 6 years ago

Hi !

Well, nope. A hardware SHA would be nice for Bitcoin (if they were not mined by tons of ASICs) but not for Cryptonight. On CPU, cryptonight is already almost full hardware: hardware AES keygen, AES rounds, 128-bits multiply (on x64 cpu only) and even the 64 bits divide of CN-Heavy (on x64 cpu only).

The not-really-AES instruction would require time consuming adjustements after, killing all gain.

AVX can help a bit with its 256-bits registers, but gain is very low. Otherwise there's no more room for speed increase.

And since i'm now focusing on GPU version, i no longer have time to experiment low-order or CPU-specific optimizations :(

gritche70 commented 6 years ago

Thanks for having take time for a answer, and i keep a eyes on a Linux Gpu version, sounds promising if gain are the same as with CPU

jceminer commented 6 years ago

Hoo, i read more about padlock, and yes, in all the algo it implements, there's the real 128-bits AES, my bad, it could work fine in fact, no need for a post-tweak. But the dev time problem remains, in addition i've no VIA cpu to test on, so there will probably be no Padlock-enabled version of JCE, but sure it would have been perfect at the time !