When Idioms Become Bottlenecks
summary
Explores concrete cases where Go idioms hurt performance: uses unsafe slice-to-string conversion and reverse conversion to avoid garbage, uses unsafe pointer for zero-allocation generic data to skip interface allocations, and replaces crypto paths with hand‑written assembly encryption to cut allocations ~200x and CPU ~7x. Builds a lock-free bounded MPMC queue with a custom blocking primitive, benchmarks on a 48‑core machine show much higher throughput but increased CPU use and wildly unpredictable tail latency.
AI-written summary · about
chapters (8)
- 0:00Intro
- 0:50About me
- 3:15Slices to strings
- 5:12Unsafe
- 11:08Queues
- 13:59Sink Condition
- 14:52Alternative vs Channels
- 15:38Lets Bench








