3 ms·
> Interoperating with these native libraries in Go requires the use of CGO, which switches us from a pure Go toolchain to a much slower C toolchain. Moreover, t
by harikb 4y ago
> Interoperating with these native libraries in Go requires the use of CGO, which switches us from a pure Go toolchain to a much slower C toolchain. Moreover, this switch is a global process, meaning that if we use a single native library, we have to build our entire codebase with CGO
If author is around, can they explain this part in detail? I don't understand how one CGO usage slows everything else
- ryanpetrich 4y agoGo's internal linker is much faster than the system linker thanks to some go-specific optimizations. Go must fall back to the system linker whenever CGO is used.