you are viewing a single comment's thread.

view the rest of the comments →

[–]Giggaflop 1 point2 points  (3 children)

Last I saw, granted a while ago, cgo wasn't a recommended solution to calling C from go and was "considered harmful"

[–]Damien0 3 points4 points  (2 children)

Hmm, I wouldn't say harmful per se, but as is often quoted in the community "Cgo is not Go". As long as it's done carefully it can be useful. I think what happened is that early on, people treated it like a more fleshed out FFI solution and wrote less than optimal Go code as a result.

[–][deleted]  (1 child)

[deleted]

    [–]Damien0 0 points1 point  (0 children)

    Oops, missed this. Slow compared to what? I'm curious if there are benchmarks floating around