Why Slower LLM Models Sometimes Make Fewer Code Changes

    This article examines a side-by-side LLM evaluation where two models fixed the same broken configuration file and passed all three tests, yet the slower model changed only about 12 lines while the faster one migrated the service to a new port and added extra parameters. It explains how to set up a fair comparison, defines eight metrics including TTFT, TTFA, total latency, output tokens, reasoning tokens, answer tokens, tokens per second, and relative cost, and shares a reusable minimal-change prompt. The key takeaway is that latency, cost, and change quality are independent curves, so review diff semantics before speed.

    1. The Observation: Why the Slower Run Changed Less

    A common result in side-by-side model evaluations looks like this: given the same task of fixing a defective configuration file, two models both make all three tests pass, but they get there in completely different ways. Model A takes about 57.9 seconds and changes roughly 12 lines. Model B takes about 19.6 seconds, makes a larger change, migrates the service to a new port, and adds the related parameters for it.

    Intuition says the slower model “thinks more” and should therefore change more. The opposite is true. To explain this, you have to break “time spent” into computable metrics, break “changes” into reviewable semantic units, and then look at how the reasoning process turns into a code diff.

    2. Setting Up the Evaluation: Keeping the Comparison Fair

    The core value of a side-by-side evaluation is the same input, the same measurement standard, and reproducibility. A workable setup follows these principles:

    • Send the same user prompt to two or more models at the same time. Do not inject an extra system prompt, and do not set temperature, reasoning effort, or similar parameters, to avoid hidden bias.
    • If a model defaults to medium reasoning effort, record that default. If a model has thinking mode enabled, label it as well, because this significantly changes both latency and token structure.
    • Do not set an output limit, or confirm the limit is far above actual usage, so the answer is not truncated.
    • Enable streaming output and usage reporting, and start the browser-side timer the moment the request is sent, to keep a consistent time baseline.

    Example request structure (pseudocode):

    1. request = {
    2. messages: [{role: "user", content: PROMPT}],
    3. stream: true,
    4. stream_options: {include_usage: true}
    5. }
    6. start_timer() # same moment the request is sent

    3. Eight Metrics: Definitions and How to Calculate Them

    1. Time to first token (TTFT): time from sending the request to receiving the first streaming chunk, including reasoning content; for models with thinking enabled, the start point is the first reasoning increment.
    2. Time to first answer (TTFA): time from sending the request to receiving the first formal answer increment, measuring “how long until it speaks plainly.”
    3. Total latency: total duration from sending the request to the end of the stream.
    4. Output tokens: the total completion tokens from the last usage chunk.
    5. Reasoning tokens: read from the usage details.
    6. Answer tokens: completion tokens minus reasoning tokens.
    7. Tokens per second: the sum of reasoning and answer tokens divided by total latency, representing the average throughput of the whole request.
    8. Relative cost: converted using the common standard where input and output are priced separately; input and output unit prices differ and must be accumulated separately.

    Calculation example:

    1. answer_tokens = completion_tokens - reasoning_tokens
    2. tokens_per_sec = (reasoning_tokens + answer_tokens) / total_seconds
    3. cost = input_tokens * price_in + output_tokens * price_out

    4. The Prompt: A Reusable Fix Instruction

    1. You are a senior operations engineer. Fix the problems in the configuration file below so it passes the given tests.
    2. Requirements:
    3. 1) Make only necessary changes and keep the original structure and style;
    4. 2) Do not introduce new dependencies or external resources;
    5. 3) After the changes, explain item by item what was changed and why;
    6. 4) If multiple viable approaches exist, choose the one with the smallest change surface.
    7. File to fix: <paste the configuration manifest here>
    8. Acceptance tests: <paste the test commands and expected results here>

    The key is the “minimal change” constraint and the “explain the reasoning” constraint: the former compresses the change surface, and the latter makes the reasoning explicit for easier review.

    5. Why Slower Means Fewer Changes

    • Reasoning depth buys change precision: the slower run spends its time on internal reasoning and comparing approaches, and ends up with only 12 lines of necessary changes; the faster run starts producing earlier, casually does a port migration and parameter split along the way, and ends up with a larger change surface.
    • Metric mismatch: total latency is affected by reasoning tokens, while lines changed are affected by strategy; the two are not the same dimension and cannot be linearly extrapolated.
    • Different risk preferences: one leans toward conservative fixes, the other toward structural adjustment; given that both pass the tests, a smaller change is usually easier to review and easier to roll back.

    6. Actionable Recommendations

    • Fix the eight metric definitions in your evaluation table, and record lines changed and test pass status at the same time.
    • In code review, look at diff semantics first and speed second; write “minimal viable change” into the prompt and team standards.
    • Account for cost separately by input and output to avoid misjudging with a single unit price.
    • Label models with thinking mode enabled separately, to avoid comparing them directly with models at default reasoning effort.

    7. Conclusion

    Speed, cost, and change quality are three independent curves. Only by understanding how the eight metrics are calculated can you make explainable, reproducible, and reviewable technical choices in a side-by-side evaluation. Baidu AI Cloud also emphasizes in its engineering practice driving decisions with a unified measurement standard and observable metrics.