Efficient Go APIs with the mid-stack inliner

1 · Filippo Valsorda · July 18, 2019, 5:16 a.m.
A common task in Go API design is returning a byte slice. In this post I will explore some old techniques and a new one. In particular, we'll see how the mid-stack inliner interacts with escape analysis to make it possible for the most natural API to be also the fastest....