Re:Why modern software is slow
by generichuman on Saturday October 01, 2022 @09:40AM
(#33046519)
> dictionary hashing is too slow to be ideal
Even when you use SIMD intrinsics?
For example: https://en.wikipedia.org/wiki/Intel_SHA_extensions
A repo I just found illustrating those instructions' usage: https://github.com/noloader/SHA-Intrinsics
Not the OP, but those extensions implements cryptographic hash functions, they are not very suitable (too slow) for hash-tables and other hash based data structures.
Re:Why modern software is slow
by generichuman on Monday October 03, 2022 @08:04AM
(#33066290)
4 CPU cycles is too slow? Because SHA256RNDS2 is 4 clock cycles on Zen3 CPUs. 6 clock cycles on Intel Alder Lake (12th gen).
Source is the measurements here: https://uops.info/table.html
Yes, because SHA256RNDS2 aid the implementation of the update function of SHA256. We should invoke it multiple times on the message blocks, it performs two rounds out of the 64 SHA256 rounds.
Re:Why modern software is slow
by generichuman on Tuesday October 04, 2022 @06:24AM
(#33078434)
> We should invoke it multiple times
That'd make SHA256RNDS2 even faster because of the throughput numbers.
I'm curious, what's the faster algorithm for hashing you use? I don't want to waste time on intrinsics and inflict complexity on my colleagues if there are alternatives I can use!
In most games this doesn't matter, but occasionally you have a frame time target and you need to take extra steps like that. Those extra steps can be hard work when they come up!