It's well-known that computing lots of hash functions (like SHA1) in parallel involves the use of GPUs in most cases. However, when doing something serially, such as computing
sha1(sha1(sha1(...sha1(x)))) parallelism would not seem to be that useful.
I ran into this very problem recently, and I started running a program on my Mac laptop using python, at about 270k hashes/sec. Moving to a C implementation, I was able to get 750k hashes/sec. And strangely, using VirtualBox with Kali and the same C implementation, about 1.3m hashes/sec.
(There is some discussion one can find online regarding why a Linux version of SHA1 code might be faster than a Mac OS version, even when the former is through a virtualization layer, but this is beyond the scope of my question.)
Question: If I want to compute SHA1 as fast as possible and parallelism is not helpful, what's the fastest way to do it? I suppose the answer involves special hardware? Or buying a desktop with a good CPU and overclocking?