Lesson: make AI show the comparison, not just the answer

Simon Willison's 8 Nov experiment asked Claude to build the same small SQLite number parser in C and Rust, compare speed and binary size, then investigate the surprising result. The useful idea is the experiment design, not a general claim that one language is faster.

What the primary sources show

The method worth keeping

  1. Define behavior before asking for alternatives. Here, 45% means 45, not 0.45; scientific notation and a leading plus sign are rejected. Those choices matter more than a fast but different answer.
  2. Run the same correctness cases against every version. The report includes 40 curated cases and reports 8 million fuzz comparisons with no mismatches. Passing these tests is evidence, not proof of all possible correctness.
  3. Measure the same workload and an appropriate baseline. The report uses two million rows, alternates implementations and subtracts a baseline scan. It reports the fastest of 15 runs, not a typical latency or a confidence interval.
  4. Investigate the surprising result before optimizing. The slow path was a general decimal parser, not simply the choice of C versus Rust.
  5. Preserve the code, test inputs, raw results and remaining caveats so the next person can question the conclusion.

Limits and cautions

Application: compare expected answers before changing a product

Before changing a product, agree a small set of inputs and expected answers; preserve the old version as a baseline; compare both on exactly those cases; examine errors before speed. This helps decide whether a change is actually better rather than merely different. In a hypothetical reading recommendation feature, useful cases might include a book already read, the wrong author, or an ignored mood constraint. This is a generic application of the method, not a claim about any product or a performed test.

Primary sources and material