Half the frame was a message nobody read
Two of the hardest worlds we test with had been running under their frame-rate floors for a whole stretch of work, and every plan we wrote assumed the simulation had outgrown the frame. It had not. Roughly half of each frame was going into a sentence the game wrote to itself and then discarded, unread, about twelve thousand times a second.
A plan with no culprit in it
The previous performance brief had named a suspect with confidence and been wrong about it, so the one written on 13 July carried no diagnosis at all: a mandate to measure, and nothing else. We had learned the measure-first lesson once already and were still not applying it consistently.
So the first artefact was an instrument, not a lever. We built a per-pass timer for the simulation with two rules that hold its arithmetic to account: a total may only be summed from the innermost passes, and every enclosing pass has to check out against the sum of its children. When that checksum went from hiding 94% of the frame to hiding 0.44%, the numbers became worth reading.
They immediately shot the arc’s prime suspect. A whole-field copy of the forage data, feared through two arcs of planning, was 0.9% of the frame. The real weight sat in the per-creature step, at 55%. Two arcs of anxiety about a 0.9% pass, retired by one measurement.
The rig then embarrassed itself twice on the way. It had been timing a plant layout the game does not ship. And one report printed a sentence calling a pass unmeasured three sections below the line where it printed that pass’s measurement. Both were caught and fixed, and both left the same rule behind: when a tool’s prose disagrees with its numbers, the numbers win. A defect inside an instrument does not merely lose you data. It manufactures evidence.
Two lines
The answer landed the next day and it was two lines long.
The language the game is written in has an internal safety check: a developer states an assumption, attaches a sentence explaining what it means if the assumption ever breaks, and the check catches the impossible state during development. The quirk is that the engine evaluates that explanatory sentence every single time the check runs, not only when it fails. A passing check builds its own failure message in full, then throws it away.
We proved it rather than believing it: across 100,000 trials, 100% of passing checks still built their message. A check carrying a formatted message cost about 1,464 nanoseconds; the same check with plain constant text cost about 337. The formatting alone was roughly four times the cost of the entire check it decorated.
Two per-entity lookups sat in the hottest loops in the game, each carrying a message that formatted live values into text. The plant one ran about 11,900 times a frame during the candidate scan. That was the whole problem.
Half the frame was a message nobody read.
The fix keeps the full explanation, and parks it in a branch the healthy path never enters: test the condition first, and assemble the sentence only if it actually failed. Those two lines took the death-stress world from 37.0 ms a frame to 22.3. Extending the same shape to 45 more checks on hot paths took it to 18.0 ms, or 27 frames a second to 55. The birth-stress world went from 38.5 ms to 20.2. The cut the arc had believed it needed was 6.71 ms, and it was already gone.
Scope mattered as much as the shape. We converted checks living inside per-creature and per-plant loops and left the rich, formatted messages on paths that run once, where the cost is nothing and the explanation is worth having.
The instrument was inside its own number
The most telling of those 45 sites was in the profiler itself. The tool built to price the frame had been paying the string tax on every reading it took, which made it a term in the number it printed.
Nothing about the world moved. The same candidates were examined in the same order and the same winner picked, in both scenes, with 334 and 607 creatures respectively. The counters came out identical: same creature counts, same forage numbers, to the byte. This is the discipline we lean on whenever a speedup has to leave the world untouched, and it earned its keep again here. The simulation never changed. Only the cost of narrating it did.

The frame we had been grading was never the one players run
Then the finding got sharper than the fix.
Those safety checks are stripped out of an exported release build entirely. The game people actually play had never paid a nanosecond of the cost the whole arc had been chasing. Every frame-rate gate the project had ever measured against was grading a binary nobody runs.
The documentation said as much, and we declined to take it. The cheapest thing available was to write down “the docs say stripped, so stripped” and move on; documentation is not a probe. The experiment that would have settled it could not run, because the export tooling was not installed on the machine, so the non-answer went into the record as a verified environmental blocker with a note forbidding anyone from reading it as an answer in either direction. The true state was unknown, and it was a load-bearing unknown.
It did not stay unknown for long. Measuring the project under a real release export, for the first time in its life, put the death world at 13.2 ms (76 frames a second) and the birth world at 15.1 ms (66). Development mode carries a flat 20–30% overhead on every frame: about 1.35 times heavier than what ships. Every performance decision this project has made was priced against a frame a quarter heavier than the real one.
A check is not a guard
The second implication was the serious one, and it has nothing to do with speed. If those checks vanish from the exported build, then any rule defended by a check alone is defended by nothing in the game people play. A guard that disappears on export is not a guard.
We audited every site where one of them stood in for real enforcement. There was no reachable exposure: no player action could get past one into a bad state. What was broken was the comments, which called a development-only diagnostic “the guard” and had been believed. That audit fixed a lie rather than a bug, which is its own kind of finding. A green board describing a world that doesn’t ship is a failure we’d met before.
Three permanent guards went in at the seams that needed them, the places where a player’s action first enters the simulation. Shielding a creature, curing a sickness, and marking a sapling now degrade to a logged refusal in the shipped game instead of reaching past a bad index. The rule went into our coding conventions before it was applied for the first time: an invariant defended only by a development check does nothing for a player.
The arc closed recorded as what it had turned out to be, which was never a performance problem. It cost weeks of planning against a suspect that was 0.9% of the frame, and it ended with a frame that halves, a world that came out byte-identical, three guards that survive the export, and a measurement discipline that now knows which build it is standing in.



