3 ms·
Or as simple as using the hardware accelerated CRC32 that we have in our x86 CPUs. Last time I checked, CRC32 worked surprisingly well as a hash.
by torusle 2y ago
Or as simple as using the hardware accelerated CRC32 that we have in our x86 CPUs.
Last time I checked, CRC32 worked surprisingly well as a hash.
- hooli42 2y agoHah, neat. The 'weird' instructions can often be 3-4 orders of magnitude slower than arithmetic instructions, though I doubt that matters here.
- Validark 2y agoCRC32 is the same speed as an integer multiply, going all the way back to Nehalem (2008). 3 cycles latency, and you can start a new one each cycle (or more than one, on Zen 5).
- hooli42 2y agoSure, in the same way SIMD instructions get a linear speedup in theory. If you Google the words "CRC32 is slow", you can see hundreds of people complaining about this.