Software engineers today typically put performance optimizations low on the list of development priorities. But despite significant technological advancements and lower-priced hardware, software efficiency still matters. With this book, Go programmers will learn how to approach performance topics for applications written in this open source language.
How and when should you apply performance efficiency optimization without wasting your time? Authors Bartlomiej Plotka and Frederic Branczyk provide the tools and knowledge you need to make your system faster using fewer resources. Once you learn how to address performance in your Go applications, you'll be able to bring small but effective habits to your programming and development cycle.
This book shows you how to:
Continuously monitor for performance and efficiency regressions Find the root cause of performance bottlenecks using metrics, logging, tracing, and profiling Use tools like pprof, go test, benchstat and k6.io to create reliable micro- and macro-benchmarks Improve and optimize your code to meet your goals without sacrificing simplicity and readability Make data-driven decisions by prioritizing changes that make a difference Introduce basic "performance hygiene" in day-to-day Go programming and testing
some parts are just repeated basics from CS which might be relevant for juniors while some parts are very advanced and not very aplicable to real life scenarios. Book could be easly 50% shorter for same amount of information due to its verbosity and repeated points.
I went in thinking I’d find a source of insights on Go internals and Go-specific techniques to write efficient code. Sadly, this book is all over the place. There’s a 30-page Go tutorial. 2 chapters are dedicated to motivating writing efficient code, and documenting requirements. There’s tutorials on pprof (complete with a list of command flags you can pass to specify the output format of graphs generated with it, such as SVG and PNG), and on instrumenting Go code with OTel. These are all important, useful topics. But it’s not “Efficient Go”. In other words, this book feels like it should have been 3 different books and a handful of essays/ blog posts. Those are the issues at a macro level. There are also some problems when you focus on the writing itself. There are paragraphs that could have easily been single phrases, and the grammar issues (such as the omission of articles and prepositions, common in non-native English speakers from Eastern European countries) are very distracting. The sad part is I can see the author is really passionate about the topics in the book. I don’t fault him for the problems I found - ultimately, he has useful knowledge and I thank him for sharing it, but O’Reilly failed him (and us readers) with the editing team. They should have helped the author converge towards a more defined audience and set of topics. There are some gold nuggets in this long book, but I suspect if you’re an advanced reader you’ll find yourself skimming through most of it. On the other hand, if you’re a complete beginner to programming, you’ll find the tutorials useful, but the more advanced parts could be confusing.
Probably a really great book for someone just getting into software development with Go, but if you’ve been in the field for a while, a lot of the go bits should be fairly obvious. There’s a good amount of interesting Linuxisms, especially around performance. There’s author makes the case that most production software runs on Linux even if you develop on something else so you should understand these internals (I agree!) — but I didn’t expect so much of a Linux and comp sci deep dive from a book titled Efficient Go.
Such an underrated book. As a software engineer working at a trading company using Go, the knowledge in this book is incredibly valuable to me. From fundamental concepts like hardware (CPU, RAM, etc.) to advanced tools such as micro-benchmarking, macro-benchmarking, and profiling — it has helped me a lot in writing efficient Go programs.
What I liked most was the section on continuous profiling. It gave me an ‘aha moment’ — exactly the kind of insight I’ve been looking for to become a better programmer, especially in Go.