Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/8600199cc6f4073dc9da380f3224f...



Here's mine: 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.


I have always wanted to learn about GPU programming. Now might be the time.


I couldn't resist, so here's the GPU hasher: 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.


I'm able to get 250MH/s with this. M1 Pro


I made some improvements and it's now 340MH/s




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: