Bitcoin Forum
June 22, 2024, 03:11:42 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining software (miners) / Re: New demonstration CPU miner available on: February 07, 2011, 06:37:49 AM
- lfm's byte swap optimization (faster! improves via, cryptopp)

This optimization (__builtin_bswap32) is only available on gcc 4.3 or later, and it's a bit silly because you can get this optimization from <byteswap.h> via bswap_32() (which is smart enough to use the bswap opcode) on gcc 2.0 or later. AFAIK, as long as you have optimizations turned on, the generated code is identical. I appreciate your work here, I am using your miner on my servers to mine with their idle cpu-time -- the power is already bought, after all. I've attached a patch if you don't want to trust bswap_32() to be equivalent:

Code:
diff --git a/miner.h b/miner.h
index 539b5d6..eef4ee0 100644
--- a/miner.h
+++ b/miner.h
@@ -1,6 +1,7 @@
 #ifndef __MINER_H__
 #define __MINER_H__
 
+#include <byteswap.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <sys/time.h>
@@ -24,7 +25,11 @@
 
 static inline uint32_t swab32(uint32_t v)
 {
+#if (__GNUC__ >= 4 && __GNUC_PATCHLEVEL__ >= 3)
        return __builtin_bswap32(v);
+#else
+       return bswap_32(v);
+#endif
 }
 
 static inline void swap256(void *dest_p, const void *src_p)

2  Bitcoin / Pools / Re: Cooperative mining (>10000Mhash/s, join us!) on: February 05, 2011, 07:42:31 PM
You still didn't find any solution how to find, that pool found a block, which makes "43% cheating" impossible.

I think all you really need to is to estimate the compute power of the pool to work out expected time for 43.5% (as of writing that is about 23 minutes). If you switched to working solo after an average-43.5% duration and worked solo until the average block-find time (as of writing that is about 40 minutes), then your miner's average performance should still exceed the performance of full-time pool mining. Although, I haven't done the math to work out the expected pay-off of that strategy, so maybe I am wrong.
3  Bitcoin / Pools / Re: Cooperative mining (>10000Mhash/s, join us!) on: January 28, 2011, 01:28:01 AM
Maybe I am just lucky, but I feel like the 80 BTC I've earned is well behind the 200 BTC I would've earned all on my own.

Yes, this is just a luck. There is no reason for just big difference, you have only small statistical population to make conclusion.

Well, there is a reason, it's because my luck has made me an outlier in the positive direction, and correspondingly, there is (collectively) a worse-than-average performance for the rest of the network -- it's just statistics. I just find it interesting that being a part of such a large pool essentially pegs you to average performance. Joining the pool is like putting your resources into a bank that pays interest versus going-it-alone is more like playing the lotto with your resources. It just perceptually is unfortunate to have had really good luck in the pool.. maybe it would be better to not tell me how many blocks I found. Wink
4  Bitcoin / Pools / Re: Cooperative mining (>10000Mhash/s, join us!) on: January 23, 2011, 06:41:05 PM
I've decided to pull my nodes from the pool as of Jan 22. Since joining the pool on Jan 6, I have received about 5 BTC/day for a total of ~80 BTC, and in that time, I found 4 blocks for the pool. This morning I found yet another block (for myself, this time). Maybe I am just lucky, but I feel like the 80 BTC I've earned is well behind the 200 BTC I would've earned all on my own.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!