defer overhead

What is the overhead of defer?

Answer

  1. runtime.deferproc and runtime.deferreturn cause context copy and retrieval on stack memory