Why Slower LLM Models Sometimes Make Fewer Code Changes
This article examines why a slower model can produce fewer code changes than a faster one in a side-by-side benchmark. It covers the test setup, eight metrics such as TTFT, TTFA, total latency, token counts, throughput, and cost, along with a reproducible prompt design. It explains four mechanisms behind the result and offers guidance for engineering model selection based on latency, throughput, cost, and change quality.
1. The Question: Why Does “Slower” Sometimes Mean “Fewer Changes”?
In a side-by-side code repair evaluation, two models were asked to fix the same batch of defective DevOps configuration files. The number of tasks and the acceptance criteria were identical, and both models eventually passed all test cases. The difference showed up in the process metrics: Model A took about 57.9 seconds and changed only about 12 lines; Model B took about 19.6 seconds, yet it migrated a port and added the corresponding parameters for it separately.
Intuitively, “slower” usually means “thinks more and does more.” But when you put time consumption and change size in the same table, the two are not equivalent. To understand this, you first need to break the vague notion of “time spent” into measurable components, and then discuss the relationship between reasoning depth, output strategy, and change granularity.
2. Evaluation Environment: Keeping Variables to a Minimum
For a comparison to be meaningful, the test bench needs as few “hidden parameters” as possible. A common approach is to build a side-by-side comparison interface: the user submits a single prompt, the system sends requests to two or more models at the same time, and the output content and usage information are displayed in real time under each answer.
Key constraints include:
- The prompt is delivered as a single user message, with no additional system prompt injected;
- Sampling parameters such as temperature and reasoning effort are not set explicitly, and each model’s default behavior is used;
- Output length is not artificially truncated, ensuring that answers do not hit the limit;
- Incremental data is obtained through streaming output, and a browser-side timer is started the moment the request is sent.
There is one easily overlooked detail here: different models express the “thinking process” differently. Some models put reasoning content in a separate field, and the timing start point should be the first reasoning increment; some models directly output the formal content, and the timing start point is the first content increment. If the measurement standard is not unified, the speed comparison will be distorted.
3. Eight Metrics: Definitions, Calculation Methods, and Common Misreadings
Evaluation results usually provide eight metrics, which can be divided into three groups.
Time group:
- Time to First Token (TTFT): the time from sending the request to receiving the first streaming fragment, including reasoning content.
- Time to First Answer (TTFA): the time from sending the request to receiving the first formal content fragment.
- Total time: the time from sending the request to the end of streaming output.
Usage group:
- Total output tokens: the number of completion tokens in the usage information of the last fragment.
- Reasoning tokens: read from the usage details.
- Answer tokens: total output tokens minus reasoning tokens.
Efficiency and cost group:
- Output tokens per second: the sum of reasoning and answer tokens divided by total time, reflecting the throughput of the whole request.
- Cost: estimated using a general standard where input and output are priced separately; input is usually cheaper and output is more expensive, and the specific unit price varies by vendor and tier.
There are three common misreadings: first, treating TTFT as the time when the model “finishes thinking”; second, using total time to directly represent model capability; third, ignoring the amplifying effect of reasoning tokens on cost. The correct approach is to treat the difference between TTFT and TTFA as the interval from “thinking to speaking,” and to treat the relationship between answer tokens and total time as “effective output efficiency.”
The illustrative calculation logic can be expressed as:
TTFT = t(first_delta_any)TTFA = t(first_delta_content)total = t(stream_end)out = usage.completion_tokensreason = usage.completion_tokens_details.reasoning_tokensanswer = out - reasontps = out / total
4. Reproducible Prompt Design
Whether the evaluation conclusions are credible depends largely on whether the prompt is neutral and reproducible. The following principles are recommended:
- Describe only the goal and acceptance conditions, without hinting at the implementation path;
- Specify the file scope and prohibited changes to avoid the model “refactoring along the way”;
- Require the minimum viable diff and state whether an explanation is needed;
- Fix the acceptance command and test scope to ensure a unique pass standard.
A general template is as follows:
Goal: Fix the problem in the given configuration file that causes test failures.Constraints: Only the specified file may be modified; unrelated fields must not be changed; keep indentation and naming style consistent.Acceptance: Run the established test suite; passing all tests is considered completion.Output: Provide the full content of the modified file.
Under such constraints, “smaller changes” are often not laziness, but the model judging that the root cause is singular and no spreading modifications are needed.
5. Why the Slower Model Changes Less: Four Mechanisms
First, reasoning depth is traded for change precision. A model with thinking mode enabled first enumerates failure causes internally, rules out surface problems, and ultimately touches only the line where the root cause is. Time is spent on reasoning tokens rather than written in the answer.
Second, output strategy differences. One model chooses to “migrate the port and fill in the supporting parameters,” while the other chooses a “minimum-line fix.” The former has more changes but is more thorough; the latter has fewer changes but is precise. Both can pass the tests, which shows that the acceptance criteria are insensitive to the implementation path.
Third, default parameter effects. When reasoning effort is not explicitly set, the model uses the default tier; different default values can significantly change thinking time and output length.
Fourth, timing standards affect perception. If the reasoning phase is counted in total time, thinking models are naturally slower; if you only look at the output speed of answer tokens, the conclusion may reverse.
6. Implications for Engineering Selection
- For low-latency interactive scenarios, focus on TTFT and TTFA rather than total time;
- For batch offline tasks, focus on total time and output tokens per second;
- For cost-sensitive scenarios, account for input, output, and reasoning tokens together;
- For code repair tasks, include both “minimizing changes” and “test pass rate” in the evaluation, avoiding looking only at line counts or only at speed.
In general practices on cloud platforms such as Baidu AI Cloud, this type of evaluation can be built on common capabilities such as container platforms, log services, and monitoring alerts: the container platform hosts the evaluation tasks, the log service retains streaming fragments and usage details, and monitoring alerts notify about metric fluctuations, forming a reproducible and auditable evaluation loop.
7. Conclusion
“Slower yet fewer changes” is not a paradox, but the result of evaluation standards, reasoning strategies, and task constraints working together. By breaking down the eight metrics clearly and fixing the prompt and acceptance criteria, developers can make well-founded trade-offs among speed, cost, and change quality, rather than being misled by a single number.
