3 ms·
Unfortunately, you are right that SIMD support in Go isn't great and basically requires writing platform-specific code in their quirky assembly language or usin
by kbolino 2y ago
Unfortunately, you are right that SIMD support in Go isn't great and basically requires writing platform-specific code in their quirky assembly language or using a third-party library which does that for you.
I don't think the existing use of assembly under the hood to accelerate performance when possible is something to be frowned upon though. It's an implementation detail that almost never matters.
One issue with the performance of their assembly code though is that it passes arguments and return values on the stack. I saw something about allowing code to use registers instead but I don't think it's available yet.
- meling 2y agoSupport for register-based calling convention was added in go 1.17 and 1.18. https://go.dev/doc/go1.17#compiler https://go.dev/doc/go1.17#compiler https://go.dev/doc/go1.18#compiler https://go.dev/doc/go1.18#compiler https://go.googlesource.com/proposal/+/master/design/40724-register-calling.md https://go.googlesource.com/proposal/+/master/design/40724-r...