Performance Parallelism

Use Jeff Dean and Sanjay Ghemawat's canonical parallelization and synchronization guidance. Use when tuning threads, locks, contention, critical sections, sharding, SIMD, false sharing, context switches, pipelines, channels, or lock-free designs.

boshjerns c874c4c 2 files · 1.3 KB Updated

File contents

Parallelization and synchronization

Read the exact current source section before applying it:

python3 ~/.codex/skills/performance-hints/scripts/fetch_section.py parallelization-and-synchronization --output text

Canonical section: Parallelization and synchronization

Attribute the guidance to Jeff Dean and Sanjay Ghemawat. Do not assume every hint applies: inspect the code, identify the relevant cost, and measure or estimate before recommending a change.

This section includes:

  • Exploit parallelism
  • Amortize lock acquisition
  • Keep critical sections short
  • Reduce contention by sharding
  • SIMD Instructions
  • Reduce false sharing
  • Reduce frequency of context switches
  • Use buffered channels for pipelining
  • Consider lock-free approaches

boshjerns/performance-hints-agent-skills/tree/main/skills/performance-parallelism commit c874c4c60a

Frequently asked questions

npx skillmds@latest add boshjerns/performance-parallelism