TALKS
Adventures in Cgo Performance
Abstract
Cgo is a powerful tool in the Go programmer’s arsenal. It allows Go programmers to interoperate with other languages. However, Cgo documentation is scarce and best practices for performance are hard to come by. In this tutorial session, I discuss lessons I’ve has learned working on the Go API for Wallaroo, a high-performance distributed stream processor written in Pony.
I cover hard-won knowledge about using Cgo in performance sensitive code including: ways in which Cgo makes interoperation with other languages difficult, how you can work around common sources of performance and scaling problems, and an issue with the Go runtime that can’t be worked around.
Versions of this talk
Links
Blog posts by me on cgo
- Adventures with cgo: Part 1- The Pointering
- Adventures with cgo: Part 2- Locks and other things that go bump in the night
Wallaroo references
Learning cgo references
- Golang website’s cgo overview
- cgo is not Go
- The cost and complexity of cgo
- cgo: Passing Pointers
- #cgo channel in the Gopher Slack
Cgo runtime references
Garbage Collecton and Go pointers references
- Copying Garbage Collection
- Proposal: Rules for passing pointers between Go and C
- Wallaroo Concurrent Map