Why cgo is slow @ CapitalGo 2018

Why cgo is slow @ CapitalGo 2018


This talk uses cgo and its below-average performance as an excuse to look into Go internals and what makes Go different from C.

We learn about calling conventions and the code-generated cgo trampolines; about the small goroutines stacks and how C doesn't know how to grow them; about the Go scheduler and how C doesn't yield to it; and about the garbage collector and how pointers in C memory can't be tracked.


Filippo Valsorda

June 22, 2018