4 ms·
This 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 instruct
by baby 9y ago
This 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.