4 ms·
Speaking of hashing quickly, I actually just posted an article about hardware-assisted SHA calculations and their support (or lack thereof) in mainstream proces
by ComputerGuru 9y ago
Speaking of hashing quickly, I actually just posted an article about hardware-assisted SHA calculations and their support (or lack thereof) in mainstream processors, if anyone is interested.
https://neosmart.net/blog/2017/will-amds-ryzen-finally-bring-sha-extensions-to-intels-cpus/ https://neosmart.net/blog/2017/will-amds-ryzen-finally-bring...
- baby 9y agoThis was really really interesting! I'm currently trying to get SIMD to work in Go, and my problem right now is that it's hard to understand which SIMD instruction I should support (MMX, SSE, SSE2, SSE3, SSE4, AVX, AVX2, ...?) and how I should test what my architecture supports. If you have any resources on that I'd take it.
- majewsky 9y agoAFAIK x86_64 requires that MMX and SSE1/2 are present, so that should be a pretty safe bet unless you have to support ancient x86_32 models.
- tjalfi 9y ago[0] is a presentation on SIMD targeted at game developers. It has a lot of valuable information about instruction set support and how to make effective use of vector instructions. [1] is a HN comment that summarizes the content. [0] https://deplinenoise.files.wordpress.com/2015/03/gdc2015_afredriksson_simd.pdf https://deplinenoise.files.wordpress.com/2015/03/gdc2015_afr... [1] https://news.ycombinator.com/item?id=9312856 https://news.ycombinator.com/item?id=9312856
- baby 9y agoInteresting, thanks for posting this! > If you have a 64-bit build, you WILL have SSE2 instructions Go allows you to detect a few architecture when you build (amd64, arm, arm64, 386) but not really the CPU model. So using SSE2 for anything amd64/arm64 would probably be a good solution.
- dom0 9y agoSHA1/2 through NEON on ARM is slower than BLAKE2. "openssl speed aes-128-cbc is approximately..." if performance is of any concern, don't use CBC.
- ComputerGuru 9y ago> if performance is of any concern, don't use CBC. The idea there is not the absolute performance but rather the relative speed of the operation with and without hardware acceleration. (additionally, openssl does not expose aes-128-ctr or gcm as an `openssl speed` option.)