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

Computer Science from First Principles

Interactive foundations for high-performance, low-latency systems.

Data structures Version 1.0Current part Algorithms

Low latency is not one trick. It emerges from choices made across algorithms, memory layout, scheduling, synchronization, networking, measurement, and the application itself.

This book builds those ideas from the ground up. Each chapter begins with a concrete problem and an interactive model, establishes a language-independent invariant, and then uses straightforward Rust to make the costs explicit. It assumes you can read basic Rust without making Rust syntax the subject.

Every field note answers the same questions:

  • What problem does this idea solve?
  • What is the smallest complete example?
  • What mental model predicts its behavior?
  • Which costs become visible on real machines?
  • When should you choose something else?

Start with VecDeque when work must enter and leave a collection in order, continue to binary search to see how an invariant becomes an algorithm, or browse the curriculum to see the path toward complete low-latency systems.