Reposted from newbie forum posted by bitless
I just tried this and got >3% improvement in mining speed. On my 6870, I was getting 299 MHash/sec, and now I'm getting 308 or so. The change is simple enough for anyone to do it - you don't need to be a programmer to use it.
You can go to phatk's kernel.cl file (don't worry, it just sits there in the open, no need to recompile anything), find this line
#define Ma(x, y, z) amd_bytealign((y), (x | z), (z & x))
and change it to this line
#define Ma(x, y, z) amd_bytealign( (z^x), (y), (x) )
Once you've done it, restart the miner.
Technically, this is 1 less instruction for the Maj function in the hash, which is called ~128 times for each nonce value, so we get +3% to mining speed. This will ONLY WORK if you're running with BFI_INT. I'm using phoenix with phatk kernel on Ubuntu, so YMMV, but I see no reason for this to not work with other setups. As always, do play around with aggression and other settings after you've applied the change. Deepbit seems to be accepting my shares generated this way, but it comes AS IS, without any warranty whatsoever - if it doesn't work for you, or has been posted already, please don't blame me Smiley
If this helps you mine faster, please share your MHash/sec results, before and after. You can also donate to 15igh5HkCXwvvan4aiPYSYZwJZbHxGBYwB . I hear people are getting 50 BTC for things like this, and it would be nice to get some.
If you want to verify the correctness of the change, here's the truth table for the new Ma() function
x y z Ma
0 0 0 0
1 0 0 0
0 1 0 0
1 1 0 1
0 0 1 0
1 0 1 1
0 1 1 1
1 1 1 1
Works also for POCLBM, just need to edit bitcoinminer.cl and change very same line.
Donate to 15igh5HkCXwvvan4aiPYSYZwJZbHxGBYwB
This is a repost from the newbie forum. https://forum.bitcoin.org/index.php?topic=22965.0;topicseen