go build –gcflags=-m
will show you what is and is not inlined. This is not the structural answer you seek, but it is the factual result of it. From: <golang-nuts@googlegroups.com> on behalf of <nsa...@gmail.com> Date: Friday, December 2, 2016 at 2:58 AM To: golang-nuts <golang-nuts@googlegroups.com> Cc: <nsa...@gmail.com> Subject: [go-nuts] Re: Inlining local functions On Friday, 2 December 2016 11:55:59 UTC+1, nsa...@gmail.com wrote: Is there a summary somewhere of the general rules determining when do functions get inlined? Specifically, it should always be a good decision to inline a function that is only called from one place in the code (that is, a non-reused function). Do such (at least non-exported ones) functions get inlined by the compiler? Clarification: I'm asking about implementation specific details. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.