# Spark Letter 04: Correct and still too slow: Big-O for decision makers

*2026-09-22 · Fundamentals*

Code can be entirely correct and still fail in operation. A procedure that feels quick with a hundred records can become unusable at a million. That is precisely what Big-O notation describes: how effort grows as the data grows.

![Seven complexity classes and how the work grows at ten times the data: from the same at O(1) through 10 times at O(n) and 100 times at O(n²) to out of reach at O(2ⁿ) and O(n!)](https://findyourspark.ch/assets/nl/big-o.en.png)

*Diagram: findyourspark*

## Seven classes in one minute

**O(1)** constant: runtime independent of volume (array access, hash lookup). **O(log n)** logarithmic: every step halves the problem (binary search). **O(n)** linear: twice the data, twice the time. **O(n log n)**: efficient sorting, in practice the upper bound of comfortable. **O(n²)** quadratic: every element compared with every other; ten times the data means a hundred times the work. **O(2ⁿ)** exponential and **O(n!)** factorial: theoretically interesting, practically a disqualifier.

## Where this shows up in everyday business

Whenever a process compares “everything with everything” you are in O(n²). Duplicate detection in customer lists. Matching properties against search profiles. Checking every dossier against every lender. With 500 properties and 2,000 search profiles that is a million comparisons per run, still fine. At ten times the volume it is a hundred million.

## Why this counts double in AI systems

In classical software a comparison costs compute time. In AI systems it may cost a model call, meaning money, latency and a data protection event. An O(n²) loop with a language model inside it is the most reliable known method of blowing up a cloud bill.

So we build in two stages: filter cheaply and deterministically first (rules, indexes, pre-selection), then evaluate expensively and intelligently. The model only sees what survives the pre-selection.

## The question we ask in the Sparkshop

How many cases do you have per week today, and how many in three years? If the answer is “roughly the same”, the complexity class does not matter. If it is “ten times as many”, it decides whether the same solution still holds or has to be rebuilt.

---

**What this means for you.** Ask for two numbers with every automation proposal: cost and runtime per case today, and the same numbers at ten times the volume. Anyone who cannot give you the second number has not thought the scaling through.

---

Author: Daniel Florit, CFA, findyourspark, Zürich · Source: https://findyourspark.ch/en/nl-04-big-o-fuer-entscheider.html · 2026-09-22
