October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Why a Benchmark Stopped at N=22: Nine Bugs Behind the Missing Results

A benchmark’s N=22 cutoff was a hidden Python conversion failure, not an intentional limit. The debugging account also reveals eight problems with timing extraction, units, precision, session state, and comparison design.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The benchmark stopped at N=22 because its Python agent tried to turn a very large integer into a string, triggering CPython’s integer-to-string digit limit. Removing that unnecessary conversion restored the N=24 result. The investigation then uncovered eight more issues in parsing, precision, run state, and chart interpretation. The figures below are the author’s account of what happened, not independently reproduced measurements.

Why did the benchmark stop at N=22?

The cutoff was not an intentional limit on the benchmark. In the author’s July 15, 2026 account, the Python implementation attempted to convert a large Mersenne prime to a string. CPython’s configured limit for integer-to-string conversion was 4,300 digits; the 24th Mersenne prime, 219937−1, has 6,002 digits. The conversion failed before the benchmark could record N=24.

As an Amazon Associate I earn from qualifying purchases.

The tool returned elapsed time, not the prime’s decimal representation, so converting the integer to a string was unnecessary. After removing that conversion, the author reports a Python N=24 result of 2,425.9 ms. The earlier N=22 boundary had concealed the failure rather than explained it. Read the author’s account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What were the nine bugs?

The first failure made the cutoff visible; the other problems affected whether measurements were extracted, complete, comparable, or chartable.

  1. Unnecessary integer stringification. Python converted the prime despite needing only elapsed time. Go also had an unnecessary string conversion inside its timed region, adding work to the measurement.
  2. Timing parsed from prose. The harness expected a particular phrase in Gemini’s natural-language response. The author says Python results survived only because a structured tool artifact served as a fallback.
  3. Incorrect prime counts. Node.js and Rust could report finding 100 primes even though their exponent tables contained 26. A plausible-looking count was not evidence that the measured workload matched the intended inputs.
  4. Precision discarded before plotting. Rust timings formatted to two decimal places became 0.00 ms for very fast runs. Zero cannot be represented usefully on a logarithmic chart, so the measurements disappeared or became unplotable.
  5. A missing duration unit. After formatting work was removed, Go emitted nanoseconds for small inputs. The parser recognized microseconds, milliseconds, and seconds, but not nanoseconds.
  6. Old session state reused during reruns. Deterministic context IDs allowed ADK to retain conversation history. In one rerun, Gemini replied, “I already did that. Do you want to do it again?” The author says assigning unique IDs to runs restored missing datapoints.
  7. Direct and routed timings treated as one comparison. The chart put direct HTTP handlers beside Gemini-routed agents, then presented the result as a language comparison. These paths include different overhead and are not a controlled comparison of languages alone.
  8. Benchmark scope narrowed instead of diagnosed. Reducing the sweep to N=22 hid the crash. The author’s lesson: “The workaround you commit is the bug you keep.”
  9. Completeness and chart assumptions went unchecked. Missing measurements, zero-rounded values, mismatched counts, and parser blind spots were allowed to shape what the chart showed. Treating the harness and chart as software to validate—not as neutral reporting layers—was part of fixing the result.

How should you interpret the reported numbers?

The author describes a comparison of four agents written in Python, Go, Node.js, and Rust, with a sweep from N=1 through N=24. Python and Go used Gemini tool calling through ADK; Node.js and Rust used direct HTTP handlers. Each implementation calculated Mersenne primes with Lucas–Lehmer.

Reported figure What it describes How to read it
4,300 digits Integer-to-string digit limit described by the author for CPython Author-reported configuration in the 2026 account; not independently verified here.
6,002 digits Author’s stated digit count for 219937−1 Explains why string conversion at N=24 encountered the reported limit.
2,425.9 ms Python result at N=24 after the unused conversion was removed Author-reported result, not an independently reproduced timing.
2.6 ms and 4.6 ms Reported median round-trip times for the two direct-handler agents The author’s account does not identify which number maps to which language.
About 1.6 s and 1.8 s Reported median round-trip times for the two Gemini-routed agents Author-reported approximate medians; these include a different execution path.
96/96 datapoints Final sweep completeness after the reported fixes Author-reported outcome, not an independently inspected result archive.

The round-trip medians are not a language-only result: direct HTTP handling and Gemini/ADK-mediated tool calls do different work. They also describe end-to-end latency, which should not be conflated with the time spent on the prime calculation itself. A fair comparison needs labels that distinguish execution path, measured quantity, and input size.

How can you prevent the same class of benchmark failure?

  • Trace the failure before accepting a cutoff. When a sweep ends at a surprising boundary, inspect the error and stack trace rather than shrinking the test range and treating the new limit as a design choice.
  • Keep machine-readable results structured. Have the program or tool return timing and status in structured fields. Do not make a parser depend on wording in generated prose when a structured artifact is available.
  • Preserve numeric precision. Store raw durations at sufficient precision; round only for display. Avoid converting a valid small positive duration into zero before plotting.
  • Parse units explicitly. Normalize supported units—such as ns, µs, ms, and s—to one base unit, and reject or flag unknown units rather than silently dropping values.
  • Validate workload counts. Check that the number of inputs actually processed agrees with the benchmark plan and reported count. A run that says “100” while its table has 26 entries should fail validation.
  • Isolate stateful runs. Give each independent agent run a unique context identifier when the framework can retain conversation history. Otherwise, an apparent rerun may be a continuation of an earlier session.
  • Separate unlike execution paths. Report direct-handler latency separately from model-routed round trips, and identify whether each figure measures calculation time or total request time.
  • Check completeness before charting. Verify expected versus observed datapoints, missing values, unit conversions, and log-scale constraints. A chart cannot repair a broken harness; it can make the harness’s omissions look authoritative.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What does the final 96/96 result establish?

The author says the fixes produced all 96 expected datapoints. That supports the account’s claim that the sweep ran to completion after the harness problems were addressed. It does not, by itself, make the cross-language chart a controlled language comparison: the reported agents still used different execution architectures, and the figures were not independently reproduced for this article.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.