Beyond Effective Go: Part 1 - Achieving High-Performance Code

Beyond Effective Go: Part 1 - Achieving High-Performance Code

Beyond Effective Go: Part 1 - Achieving High-Performance Code

Beyond Effective Go: Part 1 - Achieving High-Performance Code

eBook

$18.99  $24.99 Save 24% Current price is $18.99, Original price is $24.99. You Save 24%.

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

Are you an experienced Go developer that wants to be more productive? Do you want to write cleaner, faster, and easier to maintain code?

Then the Beyond Effective Go book series is for you.


This series is aimed at competent Gophers. It does not mess around with the basics but instead dives right into the daily problems that professional programmers face. Chiefly, how to write fast, robust applications and services that can be maintained and extended as requirements change.


Unlike most books, Beyond Effective Go focuses on the programmer and the code by addressing the four critical aspects of programming in Go - developer productivity, application performance, code quality, and depth of understanding of the language and tools.


This book, Part 1 of the series, focuses on achieving high-performance code. You will learn which aspects of your application or code to focus on and when. You will have a suite of tools, software patterns, and recipes at your disposal to make your life easier. After reading, you will:

  • Understand the differences between Concurrency and Parallelism.
  • Identify and avoid concurrency issues like deadlock, starvation, livelock, and data races.
  • Understand the various concurrency interaction patterns and be able to apply the one that best fits the problem at hand.
  • Take a deep dive into Go's concurrency primitives and be able to apply them expertly but also avoid many of their gotchas.
  • Be able to diagnose concurrency and performance issues using Go's profiler, execution tracing, and benchmarking tools.
  • Be able to identify when code needs optimizing, what needs optimizing and how.
  • Have a catalog of concurrency and performance patterns that you can quickly apply to your projects.

Product Details

ISBN-13: 9780645582062
Publisher: Corey S. Scott
Publication date: 09/06/2022
Series: Beyond Effective Go , #1
Sold by: Barnes & Noble
Format: eBook
Pages: 184
File size: 2 MB

About the Author

Corey Scott is a Senior Principal Software Engineer at Grab and Ovo, living in Melbourne, Australia. He has been programming professionally since 2000, with Go as his preferred language for building large-scale distributed services since 2014.

Table of Contents

Chapter 1 - Understanding Concurrency, Parallelism, and the Sync Packages

Understanding Concurrency & Parallelism

Unraveling Go's Concurrency Approach

Deadlocks, Starvation, and Livelocks

Data Races

The Sync/Atomic Package

The Sync Package


Chapter 2 - Applying Go Concurrency: Primitives, Patterns, and Tools

Goroutines for Experts

Channels for Experts

Select Statements for Experts

Extended Semaphores

Advanced Concurrency Patterns

Copy-on-write

Batching

Reply channels

Event listeners

Fastest responder

Update oldest

Resource pool

Execution Tracing

Keeping Out of Concurrent Trouble


Chapter 3 - Achieving High-Performance Code

When, What, and How to Optimize

How to Optimize with pprof

CPU, Memory, Block, & Mutex profiling

Benchmarking

Constructing good benchmark tests

Benchmarking tricks & traps

Performance Patterns

The fastest code

Reducing allocations

Trade memory for CPU

Pre-allocation

String concatenation

Printf and friends

Cheap checks before expensive ones


From the B&N Reads Blog

Customer Reviews