~/talk

My Protobuf Module is Faster than Yours (Because I Cheated)

Talkat GopherCon 2025 · 2025-08-26..08-28· [go]
name:Tom Lyons
links:none on file
slides:none on file

Claims a custom Go protobuf decoder processes CrowdStrike traffic at about 35 million messages/sec by using aggressive tricks: pre-validated decoder objects, sync.Pool reuse of result structs and field buffers, and optional unsafe mode to alias []byte as string. Implementation trades memory-safety and complexity for performance, achieves near zero allocations at steady state, and outperforms standard decoders, but requires strict caller discipline and careful review because it can cause memory corruption or long-lived heap growth.

AI-written summary · about

  1. 0:00Introduction
  2. 1:27What is Protobuf
  3. 2:53Protobuf vs JSON size
  4. 3:38Dynamic Protobuf decoding
  5. 5:02Pre-validating Protobuf definitions
  6. 6:47Reusing allocations with sync.Pool
  7. 9:01Zeroing reused structs
  8. 11:08Unsafe string conversion
  9. 13:18Reusing slices for booleans
  10. 15:48Zero allocations steady state
  11. 17:13Benchmark results
  12. 17:34Why not in production
  13. 19:16Safety and trust
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.