6 ms·
I managed to get #69 and then #42 with some Go code I repurposed since I was messing around with HashCash a while ago. Including the code below if anyone is cu
by boyter 2y ago
I managed to get #69 and then #42 with some Go code I repurposed since I was messing around with HashCash a while ago.
Including the code below if anyone is curious. I managed to get a 9 zero hash in under an hour on a M2 Mac Mini using it. Its only about ~3.3 MH/s which is not very impressive, but it was very easy to write.
https://gist.github.com/boyter/8600199cc6f4073dc9da380f3224ff25 https://gist.github.com/boyter/8600199cc6f4073dc9da380f3224f...
- grishka 2y agoHere's mine: https://gist.github.com/grishka/ed84e4bbfacfbcf4ddc5e63cfc966c69 https://gist.github.com/grishka/ed84e4bbfacfbcf4ddc5e63cfc96... I suppose the next step for me would be to make use of the GPU, which is a much better fit for this job and I'm sure would increase my hash rate by orders of magnitude, but I researched it for a bit and running code on the GPU on a Mac is cumbersome to say the least.
- boyter 2y agoI have always wanted to learn about GPU programming. Now might be the time.
- grishka 2y agoI couldn't resist, so here's the GPU hasher: https://gist.github.com/grishka/c1be1c035f39564debfd4b195bdfcac4 https://gist.github.com/grishka/c1be1c035f39564debfd4b195bdf... It gets around 232.5 MH/s on the M1 Max. There's also an optimization that exploits the fact that SHA256 is incremental, so the state for the common prefix could be pre-computed and then copied and only updated with the variable part. This yields around 30% performance boost.