Making a Go program 70% faster with a one character change • Harry Marr
hmarr.com · 1,244 words · saved by 1 readers
Programmer and engineering manager working at GitHub. Co-founded Dependabot, and helped build Monzo and GoCardless.
If you read the title and thought “well, you were probably just doing something silly beforehand”, you’re right! But what is programming if not an exercise in making silly mistakes? Tracking down silly mistakes is where all the fun is to be had! I’ll also state the usual benchmarking caveat up front: the 1.7x speedup was measured while running the program on my data on my computer, so take that number with a big old pinch of salt. What does the program do? codeowners is a Go program that prints out the owners for each file in a repository according to a set of rules defined in a GitHub CODEOWN
related reading
- abseil / Performance Hintsabseil.io
- Writing Better Go: Lessons from 10 Code Reviews - Speaker Deckspeakerdeck.com
- Writing Better Go: Lessons from 10 Code Reviews - Speaker Deckspeakerdeck.com
- Profiling Go programs with pprofjvns.ca
- A Bunch of Programming Advice I'd Give To Myself 15 Years Ago | Marcus' Blogmbuffett.com
- Using go fix to modernize Go code - The Go Programming Languagego.dev
- Speed mattersscattered-thoughts.net
- Frequently Asked Questions (FAQ) - The Go Programming Languagego.dev
- There's no reason for software to be slow anymoredanluu.com
- Four Days of Go – Evan Millerevanmiller.org
- Go at Google: Language Design in the Service of Software Engineering - The Go Programming Languagego.dev
- Golang landminesgist.github.com