~/talk

Go low latency patterns

Talkat GopherCon Singapore 2023 · 2023-11-02..11-03· [go]
links:none on file
slides:none on file

Diagnoses a real legacy hotspot where an update function runs millions of times per second and causes 30% CPU due to GC by allocating on each call, then shows fixes: change field assignment, preallocate once, or switch parameter types. Demonstrates escape-analysis quirks (the con t46 runtime small-value cache at 0xFF/256), compares exact-type, interface and generic parameter behavior and inlining rules, and describes pointer-return patterns plus the dangerous NoEscape workaround. Recommends verify escape output and prefer allocate-once and value returns when predictable latency matters.

AI-written summary · about

  1. 0:00Introduction and speaker info
  2. 1:04What is latency and performance basics
  3. 2:29Real-world GC overhead example
  4. 3:35Talk agenda overview
  5. 3:55Interfaces and heap allocation
  6. 8:12Avoiding heap allocation with interfaces
  7. 9:18Exact type vs interface parameters
  8. 11:26Generics and heap allocation
  9. 12:09Inlining optimizations explained
  10. 13:14Interface vs generic performance comparison
  11. 15:01Choosing between interfaces and generics
  12. 16:32Pointers and heap allocation pitfalls
  13. 17:57Safe pointer return patterns
  14. 18:40Performance in math/big package
  15. 19:27Custom stack-allocated types
  16. 20:11NoEscape function and risks
  17. 21:18Escape analysis verification tips
  18. 22:02Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.