Remix.run Logo
ashf023 13 hours ago

Yeah, golang is a particular nightmare for SIMD. You have to write plan 9 assembly, look up what they renamed every instruction to, and then sometimes find that the compiler doesn't actually support that instruction, even though it's part of an ISA they broadly support. Go assembly functions are also not allowed to use the register-based calling convention, so all arguments are passed on the stack, and the compiler will never inline it. So without compiler support I don't believe there's any way to do something like intrinsics even. Fortunately compiler support for intrinsics seems to be on its way! https://github.com/golang/go/issues/73787

Thaxll 10 hours ago | parent [-]

Go has been using register based calling for a while now?

immibis 9 hours ago | parent [-]

GP comment said it's not used for FFI, not that it's not used.