TGViewer
TechLead Bits TechLead Bits @techleadbits · 517 subscribers
Post #201 263
GenAI for Go Optimizations

Today, code generation with an AI assistant doesn't impress anyone, but GenAI can be helpful not only for that. Uber recently published an interesting article about using LLMs to optimize Go services.

So what they did:
🔸 Collect CPU and memory profiles from production services.
🔸 Identify the top 30 most expensive functions based on CPU usage. If runtime.mallocgc consumes more than 15% of CPU time - additionally collect a memory profile.
🔸 Apply a static filter to exclude open-source dependencies and internal runtime functions. It allows to reduce noise and focus on business code only.
🔸 Prepare a catalog of performance antipatterns, most of them were already collected during past optimization work.
🔸 Pass source code and antipatterns list to LLM for analysis.
🔸 Validate the results using a separate pipeline: check whether an antipattern is really present and whether the suggested optimization is correct.

The article also contains interesting tips how they tuned prompting, reduce hallucinations and improve the trust for the tool among developers.

What I like about Uber’s technical articles is that they always calculate the efficiency of the results:
Over four months, the number of antipatterns reduced from 265 to 176. Projecting this annually, that’s a reduction of 267 antipatterns. Addressing this volume manually, as the Go expert team would have consumed approximately 3,800 hours.

we reduced the engineering time required to detect and fix an issue from 14.5 hours to almost 1 hour of tool runtime—a 93.10% time savings.


#engineering #usecase #ai
  • 🔥 6
More from @techleadbits
  1. Oct 1, 2026Tracer Bullets Continuing the topic from the previous post, let's talk in more detail abou…
  2. Sep 28, 2026Why Software Factories Fail "Read the Code!" is one of the key ideas from Dex Horthy's tal…
  3. Sep 21, 2026Illustrations from The Culture Map showing how different cultures compare on the scales. #…
  4. Sep 21, 2026The Culture Map Have you ever worked in international distributed teams? Or collaborated w…
  5. Sep 10, 2026Loop Engineering from First Principles Continuing the topic of Loop Engineering, I'd like…
  6. Sep 7, 2026Loop Engineering Over the past year, AI has been constantly bringing new terms and practic…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →