latency-engineering
Latency Engineering
Comprehensive guidance for diagnosing and reducing latency across the full software/hardware stack.
Mental Model
Latency = time delay between a cause and its observed effect. It is a distribution, not a single number. Always think in percentiles (p50, p95, p99, p99.9). Tail latency dominates real-world user experience far more than averages suggest.
Two fundamental laws:
- Little's Law:
Concurrency = Throughput × Latency. Use it to size systems and understand queue dynamics. - Amdahl's Law:
Speedup = 1 / ((1-P) + P/N). Use it to set realistic expectations on parallelization gains.
Decision Framework: Where to Optimize First
More from nkootstra/skills
compact-markdown
Compact, compress, or minify markdown files to use fewer tokens while preserving all information and meaning. Use this skill whenever the user wants to reduce the size of a markdown file, shrink a README, compress a SKILL.md or CLAUDE.md, minify documentation, or make any markdown more token-efficient. Trigger even if they just say "make this shorter" or "compress this" on a markdown file.
57code-complexity-audit
>-
51agents-md
Write, audit, and improve agent context files (AGENTS.md, CLAUDE.md) for AI coding agents. Use when creating or improving agent context for a codebase.
27python-best-practices
>
24adversarial-review
>
23zig-best-practices
Comprehensive Zig expertise covering allocators, comptime, error handling, build system, C interop, SIMD, volatile, atomic, align, and performance. Use when writing, reviewing, debugging, or refactoring Zig code. Triggers: Zig, .zig files, build.zig, build.zig.zon, zig test, zig build, allocators, comptime, SIMD, volatile, atomic, align, or any Zig-specific concept.
16