fireice-uk / xmr-stak-cpu

Monero CPU miner
GNU General Public License v3.0
1.11k stars 478 forks source link

win32 Release #14

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi, Is there a 32-bit release?

dimecoin commented 7 years ago

What CPU do you have?

I'd would wager that if your CPU isn't 64-bit, then it most likely doesn't have AES instructions :)

fireice-uk commented 7 years ago

I'm starting to get slightly tired from people asking about hardware AES and 64 bits, so let me tell you all a story from early Bitcoin days, back when nobody really saw it really as money, and Jesus walked the earth - here is how the community felt like

Pretty soon the first private GPU miner came out, and given the same hardware investment, it was around 30x faster. The person that operated it apparently had around 25% of the total hashrate. As you can imagine as soon as the code was public mining on cpus was out of the picture.

Fast forward to XMR. One of the reasons why I felt like dabbling in crypto-money again is that Cryptonight's GPU cost-for-hashrate avantage is only 2-3x. Why?

There are two steps in the function, and both are very fast on modern CPUs

  1. AES encryption
  2. 64 * 64 bit multiplication with a full 128 bit result

You can do both of those steps in software of course. But what is the point? Your hashrate won't even reach 10H/s and you won't cover even a fraction of the electricity used.

ghost commented 7 years ago

tnx for your full description. but I mean 32-bit operating system not cpu arch. I was run in 32-bit windows but get this error : is not valid win32 application.

dimecoin commented 7 years ago

You can do the reverse, run 32-bit applications on a 64-bit OS, but you can't run 64-bit applications on a 32-bit OS. The requirements are:

Like fireice-uk said, even if you got it to work on win32 it would be really slow. Some people mine on 32-bit ARM processes (Raspberry PI, etc), but besides that I doubt you'll get much support from the 32-bit mining scene. Best bet would be to upgrade to a 64-bit OS since you say your CPU is 64-bit.

ghost commented 7 years ago

tnx for your answer, yea I know but Is there a way to compile for win32 in 64-bit CPU ? I think if compiled for win32 in 64-bit based processor will not effect in performance.. like another miners (minergate,multi miner,etc)

fireice-uk commented 7 years ago

No. OS needs to support greater number of address bits than the program, you can fit 32 bits addresses into 64 bit virtual addresses, not the other way round. Since 386 Intel is trying to maintain backwards-compatibility with its processors. I won't bore you with the details, but if you are running a 32bit OS, your CPU is running as a 32bit processor, even if it is more capable.

You can compile 64bit code on a 32bit OS, but you would need to run it on a 64bit OS.