Empirical Big-O Profiler
Don't reason about the complexity of a function — measure it. This runs your code at geometrically growing input sizes, times each one, and fits the curve.
Your code runs on your machine. It is executed inside a Web Worker built from a
blob: URL, on a separate thread from this page. Nothing is uploaded — this demo makes
no network requests at all. A runaway function is killed by a 3 s watchdog.
- R²
- —
- exponent p
- —
- runner-up
- —
- points
- 0
time per call vs n
Hover the chart — or focus it and use ← → — to inspect a measurement.
measured fitted model
candidate models
| model | fitted form (ms) | R² |
|---|
Relative-error weighted least squares, so small n counts as much as large n. Pick a row to overlay its curve.
measurements
| n | t | reps × trials |
|---|
t is the fastest of k trials; reps are auto-calibrated so every batch runs ≥ 12 ms.
function under test
watchdog 3.0 s · worker terminated on overrun