notgiven688 / webminerpool

Complete sources for a monero webminer.
262 stars 174 forks source link

About Cryptonight V2 #75

Closed focaeppe closed 5 years ago

focaeppe commented 6 years ago

I'v tested today and i confirm that is slower then the V1 Is there anyone who has tried it before?

notgiven688 commented 6 years ago

Did you check the cv_v2 branch? Did you compile it yourself? The current cn_v2 branch is slower for v0 and v1 because of some compiler troubles which I already fixed - will update the branch soon. The cn_v2 version is slower because of the additional SQRT and 64bit DIVISION operations. Not much we can do about that - I think.

focaeppe commented 6 years ago

Yes compiled (cv_v2 branch)and tested on killallasics, almost 15% slower :(

notgiven688 commented 6 years ago

It is expected that cnv2 runs slower, also with other miner programs. The problem is that especially code without cpu intrinsics suffer.

notgiven688 commented 6 years ago

@focaeppe Probably we can cast here to double and do a floating point division which should be faster. https://github.com/notgiven688/webminerpool/blob/66f1379dbabd3a44483704e7ba3fa1deaf587a35/hash_cn/webassembly/cryptonight.c#L98

I will test it later.

focaeppe commented 6 years ago

@notgiven688 I really hope it will work ,that will really help and thanks for your effort

notgiven688 commented 6 years ago

const uint64_t aa = (uint64_t)((double)dividend / (double)divisor);

Indeed speeds up the calculations around 1-2% but fails some corner cases..