Bitcoin Forum
June 20, 2025, 03:37:11 PM *
News: Pizza day contest voting
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Tiny optimization?  (Read 821 times)
Wolf0 (OP)
Member
**
Offline Offline

Activity: 81
Merit: 1002


It was only the wind.


View Profile
March 07, 2013, 04:51:46 AM
Last edit: October 16, 2018, 03:30:00 AM by Wolf0
 #1

NaN.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1010

Newbie


View Profile
March 07, 2013, 08:10:39 AM
 #2

I was just reading all the threads about mining basically being SHA256, and something came to me. Having written a (mostly) working SHA224/SHA256/SHA384/SHA512 implementation myself, I'm intimately familiar with how it works. Now, to create a valid block, we just need a block header whose hash is under the target, correct? This means we can skip some of the last parts of SHA256, that is, computing the rest of the hash, which doesn't really matter. Now, I realize that this is really tiny, just a few adds IIRC, but even a clock cycle per hash is precious when computing so many of them.

Not sure regarding BTC miners but LTC ones already applied such a trick.
-ck
Legendary
*
Offline Offline

Activity: 4480
Merit: 1664


Ruu \o/


View Profile WWW
March 07, 2013, 09:27:03 AM
 #3

That optimisation is done on every serious mining software.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1011


View Profile
March 07, 2013, 09:47:37 AM
 #4

There's a lot of open source mining software and this optimization is most likely part of all of them. Check out the mining software forum! Smiley

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!