Thanks to some kind help from /u/howeman on reddit I was able to roughly triple the performance of my code by building OpenBLAS and then adding blas64.Use(cgo.Implementation{}) to my code. I peeked into that call, and I see that it merely sets a package variable, that presumably is used at runtime to pick the implementation.
My question is: how and when does this tie my project to Cgo? Was the C linkage was already present due to my import of the gonum libs, regardless of my setting that variable? I'm relatively new to Go, and thus far my understanding has been that Cgo gets involved whenever you use a library that has C bindings. Which would mean that merely using gonum at all forces you to use Cgo... is that correct?
My program is tiny, but I want to understand the implications of that.
Thanks.