Experiments spanning input sizes
Intermediate
Asymptotics & empirical timing
Created by Pavel
· 29.04.2026 at 19:08 UTC
Asymptotic claims are about limits; empirical curves show where limits matter for your hardware and constants. A standard exercise: double n a few times, measure runtime, plot log-log or semi-log. A line on log-log with slope 2 suggests quadratic growth; slope 1 suggests linear.
Sampling noise and setup effects mean you should not trust a single timing at one n. Sweep sizes, warm up, fix random seeds when algorithms are randomized, and record environment (Python version, BLAS, machine load).
In coursework, tabulate milliseconds vs n for a naive vs vectorised implementation—the crossover often surprises students.
Matplotlib gallery (plotting timings): [1].
Sources
University approvals: 0
Tasks
Card Info
- Topic: Asymptotics & empirical timing
- Difficulty: Intermediate
- Completed: 0 users
Creator
Pavel