Green lines it's a windows versions, as you could see optimzed version showed about 25% boost compared with original algo.
But, as the same code makes reverse effect in linux(blue lines) - optimized version works slower.
I guess it because ms compiler sucks
gcc version is faster and doesn't need some manual optimization.
But, as i talked with dga, he also had some linux specific optimizations, that makes 10-15% boost, he is going to contribute it also.
I've made some miner-specific changes because I know simpleminer better and didn't want to risk breaking the daemon. It also uses double the scratchpad memory, which seems, again, like something fine short-term in the miner but a design that would need to be adjusted to be used as a permanent solution in the daemon.
This commit improves the speed of simpleminer on my test box by 57%.
I didn't expect the gains to be that large based upon my earlier calculations, but with the increasing scratchpad size, they actually helped a ton.
There are two important consequences of this:
(a) I *believe* this change will be more beneficial -- right now -- for machines with 4-8MB cache than for huge beasts like EC2 (10-20MB L3); the big machines still have enough cache to hold the entire scratchpad, and my experiments suggest that they haven't seen the same kind of slowdown that my i7 has.
(b) It covers a pretty reasonable part of the gap to the very rough estimate of the gpu miner performance. What happens there depends, of course, on what's happened with caching on the GPU as well.
https://github.com/dave-andersen/boolberry/(you just need simpleminer.cpp)
Note: I've updated it at 3:20pm eastern to fix a memory leak. Please make sure you have the fixed version.There's one drawback to doing it only in the miner, of course: It promotes pooled mining instead of having lots of solo miners. That's probably inevitable in the long run, because it's always easier to optimize a miner if you don't need to worry about the stability and portability of the daemon itself. But we should probably think about letting people mine locally using simpleminer (or is it already possible and I'm being silly?) and/or whatever is developed on the stratum front, so that all miners are on the same footing whether they choose to pool or solo.
I consider this beta. It's linux-only, and I *hope* I didn't break anything on other platforms. Feedback appreciated - I really only have Linux and MacOS to test on. If reports come back positive and this doesn't break building / running on windows or non-ubuntu Linux platforms, I'll submit it as a pull request to the boss.
If you get rich off of this one, *now* I'll point out where you can send a few berries. grin.
BBR: 1CgXH4mgEWULe97EKW2LrcQp68MZJ7d4cffA6umkHa5ZK12Rt8M4nCyHYBzjx2ZXkuV7GPh8iFwrJat
s4x4sTkByCZZqL1F
Happy mining!
(btw: I've got some high-priority day job stuff to take care of for a bit. I'll watch for huge bugs, but adding async/longpoll was delayed a bit by getting these optimizations done. Might be next week or weekend.)