3 ms·
> We also implemented support for the sha-native instruction support. […] The new AMD rizon [sic] stuff contains this instruction, though, and the use of it giv
by TazeTSchnitzel 9y ago
> We also implemented support for the sha-native instruction support. […] The new AMD rizon [sic] stuff contains this instruction, though, and the use of it gives another 10% speedup in initial block download for those AMD systems.
Wow, using native SHA256 hashing improved performance that much? I suppose Bitcoin does use an awful lot of hashes.
- DonHopkins 9y agoThat's an understatement, like saying "I suppose Snoop does use an awful lot of weed." ;)
- stingraycharles 9y agoSHA is the core hashing algorithm that the Bitcoin blockchain is built upon, and it is a fundamental part of it. I'm actually surprised it didn't have more impact.
- kobeya 9y agoEvery single signature hashes a few kilobytes of data, on average, and there are ~10k signatures per block (more with segwit..). That's 10's of megabytes of hashing per block, even without considering adversarial transactions that purposefully inflate those numbers. That's in the range of 10-100 MB. On my CPU openssl benchmarks about 180MB/s for sha256, so 50-500ms of hash time per block. That's not insignificant.
- nullc 9y agoSHA-NI on ryzen is pretty fast... about 2 cycles per byte on large inputs. It didn't use to be such a large difference but we optimized everything else... :) Now only if Intel would ship SHA-NI in a CPU worth using.