News for hackers. Stuff that matters.
Re:The SHA256 for this sentence begins with: one, eight, two... by vluft on Monday September 11, 2023 @04:54PM (#37473562)
another pretty easy optimization is swapping to https://github.com/minio/sha256-simd, particularly if you're on a process with the sha extensions.

versus just spawning a goroutine per attempt, it'll likely be much faster as well to just split the search space into number of cores and have one chugging away on each chunk of the search space. (I have a thing to do vanity git commit hashes and that's what I do for that; for 7 characters in the hash, it takes well under a second on my CPU on average)

Re:The SHA256 for this sentence begins with: one, eight, two... by googlryas on Monday September 11, 2023 @06:10PM (#37474373)
While we're there, since the message has a fixed prefix, you can initiate the sha256 computation with it, and then repeatedly branch off of that for the test suffix.
Re:The SHA256 for this sentence begins with: one, eight, two... by oefrha on Monday September 11, 2023 @11:48PM (#37476791)
Oh I didn’t mean per attempt. If you have <= 16 cores, just wrap the first level loop body in a goroutine; if you have >16 cores, wrap the second level to spawn 256 goroutines. Very little code change, big speedup.