Preface
Welcome to the pragmatic software development world, where engineers are not afraid of ambitious performance goals. Where the change in requirements or unexpected efficiency issues is handled without stress, where code is optimized tactically and effectively, based on data, yet the codebase is kept simple and easy to read, maintain, and extend. Wait, is this even possible?
Yes, and I will show you how! The good news is that if you bought this book, you are already halfway there—it means you acknowledge the problem and are open to learning more! The bad news is that, while I tried to distill the knowledge to only what’s necessary, there are still 11 chapters to go through. I think Efficient Go is unique in this regard as it is not a quick tutorial. Instead, it is a complete guide to writing efficient yet pragmatic software that goes through all aspects I wish I had known when I started my career.
In this book, you will undoubtedly learn a lot about my favorite programming language, Go, and how to optimize it. But don’t let the title of this book fool you. While I use Go as the example language to show the optimization mindset and observability patterns, 8 out of 11 chapters of this book are language agnostic. You can use the same techniques to improve software written in any other language like Java, C#, Scala, Python, C++, Rust, or Haskell.
Finally, if you expected a full list of low-level optimization tricks, this is not the right book. Firstly, optimizations do not generalize ...