Raphael 'kena' Poss - Can We Panic Yet? Error Handling in Go

Can We Panic Yet? Error Handling in Go

Golang’s “one-size-fits-all” error handling is not a panacea. Alternatives provide good performance, and perhaps more surprisingly, are actually cheaper from a software engineering perspective.

In this talk, we will dive into the Go calling convention and quantify experimentally the mandatory performance overhead of Go’s return value handling, as well as that of handling Go’s panics, a variant of exceptions found in other languages. There is a surprising inflection point with regard to performance between error returns and panic-based exceptions to signal errors, which challenges the programming idioms recommended by the Go team. In fact, we will see how panic-based exceptions can not only improve performance, but generally improve code quality and reduce software engineering costs. These insights will be illustrated through the software patterns found in a major open source project written in Go, CockroachDB.

About Raphael ‘kena’

Raphael ‘kena’ Poss (@kena42) graduated with a PhD in computer architecture. He works with compilers and, lately, databases. He is also a major contributor to CockroachDB, one of the largest Go codebases. He likes to scrutinize the choices made by the implementers of the Go compiler.

Feel free to follow and connect with Raphael ‘kena’ on Twitter, LinkedIn, and GitHub!

Have questions for Raphael ‘kena’?

Please submit them in this thread. Raphael ‘kena’ would love to answer them!

Haven’t signed up for the free conference yet?

Grab your free tickets here :slight_smile:

Enjoyed the talk! Has the video been posted anywhere?

The videos will be uploaded soon.