whatisgithub

What is go-performance-code?

endlesscheng/go-performance-code — explained in plain English

Analysis updated 2026-08-08 · repo last pushed 2020-04-29

1Audience · developerComplexity · 3/5DormantSetup · easy

In one sentence

A presentation deck with hands-on code examples teaching Go developers how to profile programs and apply optimization techniques like object reuse and lock-free patterns to improve speed and reduce resource usage.

Mindmap

mindmap
  root((repo))
    What it does
      Slide deck included
      Hands-on code demos
      Profiling techniques
    Topics covered
      When to optimize
      Profiling Go programs
      Optimization patterns
    Optimization techniques
      Object reuse pooling
      Copy-on-write patterns
      Partition shared data
    Audience
      Go developers
      Backend engineers
      Performance-focused devs
    Use cases
      High-traffic APIs
      Data processing pipelines
      Reducing CPU and memory
    Format
      Presentation slides
      Compressed code archive

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Learn how to profile a slow Go program and find where time and memory are being wasted.

USE CASE 2

Apply object reuse patterns to reduce memory allocation overhead in high-traffic Go services.

USE CASE 3

Use copy-on-write and partitioning techniques to reduce lock contention in concurrent Go code.

USE CASE 4

Build faster data processing pipelines by applying the optimization techniques demonstrated in the code examples.

What is it built with?

Gopprof

How does it compare?

endlesscheng/go-performance-code0xallam/posthog0xallam/search-engine
Stars111
LanguagePythonC++
Last pushed2020-04-292026-03-262023-08-23
MaintenanceDormantMaintainedDormant
Setup difficultyeasymoderatehard
Complexity3/53/53/5
Audiencedeveloperpm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires extracting the compressed code archive and having a working Go environment to run the demo examples.

No license information is provided, so default copyright restrictions apply and usage rights are unclear.

So what is it?

This repository contains a presentation by Chen Yixiao, a senior engineer at Tencent, about making Go programs run faster and more efficiently. It was originally delivered at a developer meetup in Shenzhen in early 2020. The repo includes both the slide deck and a compressed file with hands-on code examples that accompany each step. The content is organized as a practical guide covering three main topics. First, it discusses when to start and stop optimizing performance, since timing matters. Then it walks through how to profile and analyze a Go program using built-in tools that measure where time and memory are being spent. Finally, it demonstrates specific optimization techniques with real code examples, such as reusing objects instead of creating new ones, using copy-on-write patterns instead of locks, and splitting shared data into partitions to reduce contention. This would be useful for any developer working in Go who wants their code to handle more work with less CPU and memory. For example, if you are building a high-traffic API or a data processing pipeline and it starts slowing down under load, the techniques here could help you identify the bottleneck and fix it without throwing more hardware at the problem. The presentation is notably hands-on rather than theoretical. The author describes it as very dry and content-dense, and each optimization technique comes with a working demo so you can see exactly how it is implemented rather than just reading about the concept.

Copy-paste prompts

Prompt 1
I have a Go API that slows down under high traffic. Walk me through how to use pprof to find the bottleneck, then show me how to apply object reuse or pooling to reduce allocation overhead.
Prompt 2
Show me a Go code example using copy-on-write patterns instead of mutex locks for shared data, and explain when this approach performs better.
Prompt 3
I want to reduce lock contention in my concurrent Go program. Demonstrate how to partition shared data so multiple goroutines work on separate partitions without competing for the same lock.
Prompt 4
Help me decide when I should start optimizing my Go program for performance and when I should stop. What signals should I look for in pprof before making changes?
Prompt 5
Show me how to benchmark a Go function before and after applying an optimization technique like object reuse, so I can prove the improvement is real.

Frequently asked questions

What is go-performance-code?

A presentation deck with hands-on code examples teaching Go developers how to profile programs and apply optimization techniques like object reuse and lock-free patterns to improve speed and reduce resource usage.

Is go-performance-code actively maintained?

Dormant — no commits in 2+ years (last push 2020-04-29).

What license does go-performance-code use?

No license information is provided, so default copyright restrictions apply and usage rights are unclear.

How hard is go-performance-code to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is go-performance-code for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.