Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Curriculum

The destination is the ability to reason about a complete low-latency system: from the shape of an algorithm, through cache lines and scheduler behavior, to packets, latency distributions, risk checks, and production failure modes.

This is not a survey of every computer-science topic. Material earns a place when it helps explain, construct, or measure high-performance systems. HFT is a later application of those foundations, not required context for learning them.

The concepts are language-independent. Rust is the primary reference language because it makes ownership, memory, and concurrency decisions visible. Modern C++ is a first-class implementation track where its object model, allocators, atomics, compiler toolchain, and low-latency ecosystem teach something distinct.

The book will not mechanically translate every listing. An experiment appears in both languages when the comparison exposes a real tradeoff: layout, lifetime, allocation, abstraction cost, synchronization, generated code, or tooling.

Part I — Data structures

Status: version 1.0 complete.

Sequences, queues, maps, sets, trees, graphs, heaps, arenas, probabilistic membership, rolling windows, fixed-capacity buffers, and choosing among them.

These chapters establish the vocabulary used throughout the rest of the book.

Part II — Essential algorithms

Status: in progress.

The goal is not broad interview-problem coverage. It is to identify invariants, prove that progress occurs, and connect asymptotic analysis with actual memory access and data movement.

Part III — The machine

This part explains why two programs with the same big-O complexity can have very different latency.

Part IV — Operating systems and execution

The objective is to understand what the operating system can do between the start and end timestamps of an otherwise small operation.

Part V — Concurrency

Correctness comes first; predictability and throughput follow from measuring the resulting contention and coordination.

Part VI — Networking and I/O

The emphasis is the complete path from a byte on the wire to application state, including where copies, queues, interrupts, and scheduling enter that path.

Part VII — Latency measurement and performance engineering

Averages are rarely enough. This part teaches how to produce measurements that remain meaningful when the system is busy or occasionally slow.

Applied track — High-performance C++

This is an applied track, not a second introductory programming course. It uses the machine, operating-system, concurrency, and measurement models established above to explain how high-performance C++ actually behaves.

Part VIII — Storage and database internals

Storage systems provide durable examples of the same locality, batching, contention, and recovery tradeoffs found in trading infrastructure.

Part IX — Market and trading systems

Finance appears here as an application of the earlier foundations rather than a collection of unexplained low-latency tricks.

Chapter rule

A topic graduates into the book only when it has a concrete motivating problem, an interactive model where motion clarifies the idea, a predictive invariant, a straightforward reference implementation, honest alternatives, sharp edges, and a focused exercise.