News for hackers. Stuff that matters.
Re:Things that make Go fast by astrange on Saturday June 07, 2014 @04:08AM (#7861601)
Function calls aren't that slow in an OoO processor - they're perfectly predictable branches, so it can just start decoding from over there. There might be a cache miss, but there might also be fewer cache misses, or even better the CPU might skip decoding with a µop cache.

Really, the purpose of inlining is so inline functions can be specialized for their new context, which can easily make the total code size smaller. On x86, size/speed tradeoffs just don't happen like they used to.

Re:Things that make Go fast by gsg on Saturday June 07, 2014 @08:19AM (#7861928)
That's not the whole story. There are other costs associated with calls such as spilling and imprecision of data flow analyses around a call site.