Bitcoin Forum
June 21, 2024, 01:53:10 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 1 BTC bounty for a pure C implementation of zcash miner  (Read 1220 times)
jl777 (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
June 23, 2016, 12:34:50 PM
 #1

The current zcash miner is in C++, but I want a pure C version. There is already C versions of blake, but not of the main birthday problem as zcash uses

James

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
vlad12
Member
**
Offline Offline

Activity: 75
Merit: 10


View Profile
June 23, 2016, 02:37:39 PM
 #2

but why?

jl777 (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
June 23, 2016, 03:23:30 PM
 #3

but why?
http://250bpm.com/blog:4 and http://250bpm.com/blog:8 give some reasons.

For doing GUI or anything not time critical, hey, you can use Java or Javascript or whatever language you want, but if performance is the primary goal (without CPU dependency), then C is clearly the answer. If CPU dependency is ok, then assembler

Last I checked, mining fell into the "performance is everything" category

please no C++ is gods gift to programming stuff and I know c++ can compile C code and has all sorts of wonderful classes for everything. I just never liked classes.

If anybody seriously believes that an optimized C miner wont be faster than a C++ one, then let us make some wager

James


http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
iGotSpots
Legendary
*
Offline Offline

Activity: 2548
Merit: 1054


CPU Web Mining 🕸️ on webmining.io


View Profile WWW
June 23, 2016, 03:27:18 PM
 #4

Software is already way ahead of hardware..

iamnotback
Sr. Member
****
Offline Offline

Activity: 336
Merit: 265



View Profile
June 23, 2016, 03:58:09 PM
 #5

http://250bpm.com/blog:8 give some reasons.

It is an interesting point, but the performance improvements he desires can be accomplished with encapsulation by employing polymorphic types (storing a header of type H that the Person type can't operate on because it only knows it is an H but the container collection can) but of course this binds the instances (e.g. of Person) to the type of H they were constructed with so they can't be added to other types of containers that require another type for H. But his C solution also makes this conflation.

The reason to prefer C over C++ is that C has a smaller surface area of base concepts whereas C++ has everything and the kitchen sink in its 1500 page manual.

When it comes to performance, a skilled C programmer can beat an average C++ programmer who utilizes the STL. So jl777 wants to understand the algorithms well enough so that he can create a C implementation. This seems to be a worthwhile activity as it will make the Zcash PoW algorithm accessible to C programmers who hate C++ of which there are probably many.

I would bet that if you can write down the algorithms in a simple pseudo code which he can easily translate to C, then I bet he'd probably pay you the bounty.
jl777 (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
June 23, 2016, 04:01:27 PM
 #6

http://250bpm.com/blog:8 give some reasons.

It is an interesting point, but the performance improvements he desires can be accomplished with encapsulation by employing polymorphic types (storing a header of type H that the Person type can't operate on because it only knows it is an H but the container collection can) but of course this binds the instances (e.g. of Person) to the type of H they were constructed with so they can't be added to other types of containers that require another type for H. But his C solution also makes this conflation.

The reason to prefer C over C++ is that C has a smaller surface area of base concepts whereas C++ has everything and the kitchen sink in its 1500 page manual.

When it comes to performance, a skilled C programmer can beat an average C++ programmer who utilizes the STL. So jl777 wants to understand the algorithms well enough so that he can create a C implementation. This seems to be a worthwhile activity as it will make the Zcash PoW algorithm accessible to C programmers who hate C++ of which there are probably many.

I would bet that if you can write down the algorithms in a simple pseudo code which he can easily translate to C, then I bet he'd probably pay you the bounty.
code clarity is the most important, but it needs to use the optimized method and also be able to actually create valid solution sets

basically a drop in replacement for the existing zcash miner

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
jl777 (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
June 23, 2016, 04:02:19 PM
 #7

Software is already way ahead of hardware..
Trains are faster than horses, but I dont see the relevance

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
jl777 (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
June 23, 2016, 04:04:03 PM
 #8

It is an interesting point, but the performance improvements he desires can be accomplished with encapsulation by employing polymorphic types (storing a header of type H that the Person type can't operate on because it only knows it is an H but the container collection can) but of course this binds the instances (e.g. of Person) to the type of H they were constructed with so they can't be added to other types of containers that require another type for H. But his C solution also makes this conflation.

The biggest issue of using C++ for system software is the undefined behavior for error handling, especially during interrupt time and all the system calls it makes on its own, which directly affects memory caching at the very least and who knows what else.


http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
iamnotback
Sr. Member
****
Offline Offline

Activity: 336
Merit: 265



View Profile
June 23, 2016, 04:05:51 PM
 #9

It is an interesting point, but the performance improvements he desires can be accomplished with encapsulation by employing polymorphic types (storing a header of type H that the Person type can't operate on because it only knows it is an H but the container collection can) but of course this binds the instances (e.g. of Person) to the type of H they were constructed with so they can't be added to other types of containers that require another type for H. But his C solution also makes this conflation.


The biggest issue of using C++ for system software is the undefined behavior for error handling, especially during interrupt time and all the system calls it makes on its own, which directly affects memory caching at the very least and who knows what else.

Which may not matter for the Equihash, but I got your point that you don't bother with C++ generally because of that general issue. And there are other tradeoffs.

Btw, I also am loathe to upgrade my C++ skills to master the STL. I last coded in C++ in approximately 2002.
jl777 (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1132


View Profile WWW
June 23, 2016, 04:21:58 PM
 #10

It is an interesting point, but the performance improvements he desires can be accomplished with encapsulation by employing polymorphic types (storing a header of type H that the Person type can't operate on because it only knows it is an H but the container collection can) but of course this binds the instances (e.g. of Person) to the type of H they were constructed with so they can't be added to other types of containers that require another type for H. But his C solution also makes this conflation.


The biggest issue of using C++ for system software is the undefined behavior for error handling, especially during interrupt time and all the system calls it makes on its own, which directly affects memory caching at the very least and who knows what else.

Which may not matter for the Equihash, but I got your point that you don't bother with C++ generally because of that general issue. And there are other tradeoffs.

Btw, I also am loathe to upgrade my C++ skills to master the STL. I last coded in C++ in approximately 2002.
When I look at C code, I can feel what the algorithms are doing, so it is a night and day difference. Being fluent vs having to look words up in a dictionary. I get headaches looking at C++ code, probably as I cant fathom the nearly infinite system states the code represents.

With C++ the possible system states are orders of magnitude greater and there is no control by the programmer. So if there is some strange bug, it can be buried deep inside of some automatic garbage collection process, causing a cache miss that triggers a swap to HDD, which then makes the interrupt handler fall out of realtime and things get out of sync.

With C, at least I know I am the cause for any bug.


http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
mrbodz
Hero Member
*****
Offline Offline

Activity: 800
Merit: 1000


View Profile
September 20, 2016, 09:17:08 PM
 #11

any news on this?
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!