3 ms·
The problem with cgo is the high function-call overhead; you only want to use it for fairly big chunks of work. Calling an assembly function from Go is a lot c
by chrchang523 2y ago
The problem with cgo is the high function-call overhead; you only want to use it for fairly big chunks of work. Calling an assembly function from Go is a lot cheaper.
https://pkg.go.dev/github.com/grailbio/base/simd https://pkg.go.dev/github.com/grailbio/base/simd has some work I’ve done in this vein.