From charlesreid1

Writing and Optimizing Go code: https://github.com/dgryski/go-perfbook/blob/master/performance.md

Split into sections:

  • Be reasonable (how to write non-slow software, 101 level stuff)
  • Be deliberate (how to write fast software, how to get the best from Go)
  • Be dangerous (how to optimize code to make it really fast)

People hear and mindlessly repeat "premature optimization is the root of all evil", but they miss the full context of the quote.


"Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."

- Donald Knuth