Skip to Content
Efficient Go
book

Efficient Go

by Bartlomiej Plotka
November 2022
Intermediate to advanced
502 pages
13h 50m
English
O'Reilly Media, Inc.
Book available
Content preview from Efficient Go

Chapter 3. Conquering Efficiency

It’s action time! In Chapter 1, we learned that software efficiency matters. In Chapter 2, we studied the Go programming language—its basics and advanced features. Next, we discussed Go’s capabilities of being easy to read and write. Finally, we mentioned that it could also be an effective language for writing efficient code.

Undoubtedly, achieving better efficiency in your program does not come without work. In some cases, the functionality you try to improve is already well optimized, so further optimization without system redesign might take a lot of time and only make a marginal difference. However, there might be other cases where the current implementation is heavily inefficient. Removing instances of wasted work can improve the program’s efficiency in only a few hours of developer time. The true skill here as an engineer is to know, ideally after a short amount of research, which situation you are currently in:

  • Do you need to improve anything on the performance side?

  • If yes, is there a potential for the removal of wasted cycles?

  • How much work is needed to reduce the latency of function X?

  • Are there any suspicious overallocations?

  • Should you stop overusing network bandwidth and sacrifice memory space instead?

This chapter will teach you the tools and methodologies to help you answer these questions effectively.

If you are struggling with these skills, don’t worry! It’s normal. The efficiency topic is not trivial. Despite the demand, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Go in Action

Go in Action

Brian Ketelsen, Erik St. Martin, William Kennedy
Istio in Action

Istio in Action

Rinor Maloku, Christian E. Posta
Learning Go

Learning Go

Jon Bodner

Publisher Resources

ISBN: 9781098105709Errata PageSupplemental Content