Urgent.News

What's breaking now, across hundreds of outlets.

Tech

I measured token cost per changed line on 36 merged PRs: the knotted diffs cost 29% more to review

My agent review bill for one Node service climbed about 18% last month and the pull request count barely moved. Twenty-two merged in October, twenty-three in November, same five step pipeline, same model, same prompt. The number that actually moved was input tokens per review, and I could not have told you which pull requests were doing it. I spent two weeks assuming something had changed on the…

A recent study found that pull requests with complex methods and conditions cost 29% more to review, compared to healthy code. Researchers Marcus Borg and others analyzed 465 pull requests from 246 open-source repositories across three LLMs and found a 22-35% increase in cost due to these factors. To test this, the author measured token cost per changed line in a single TypeScript-based Node service.

After analyzing 36 merged pull requests over 11 weeks, they discovered that the top third of pull requests with high conditional density had a median of 10.4 branching tokens per 100 changed lines and a nesting depth of 4. The bottom third had a median of 2.7 branching tokens and a depth of 2, with a 29% higher input token cost per changed line.

This aligns with the initial research findings, proving that code health impacts inference cost, though the scale may be smaller in this case. The author also noticed that during the review process, step two (reading touched files) consumed more tokens for the knotted third, leading to longer reviews and lower conversion rates to code changes.

They propose ranking diffs before reviews, limiting token consumption in step two, and monitoring per-step token usage to identify where costs are increasing.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Result::map_err Might Be Dragging Down Your App’s Performance!

The Symptom When writing functions that return Result in Rust, we frequently need to convert a sprawling set of error types into something easier to manage—or unify them under a single error type like…

  • maperr executes closure eagerly, running logic before Result is passed.
  • Heavy logic in closure impacts performance in performance-critical paths.
  • anyhow::Context defers work until runtime, avoiding unnecessary performance hit.

Deep Dive into AWS IMDSv2 Architecture and Exploitation

Why session-oriented metadata requests prevent SSRF and how to enforce it at scale. Cloud infrastructure security is not just about protecting public endpoints.

  • AWS IMDSv2 requires session-oriented authentication for EC2 instances.
  • Two-stage authentication prevents Server-Side Request Forgery attacks.
  • IMDSv2 settings can be enforced via Terraform Infrastructure as Code tools.

Google's site: search now comes back empty for pages it has indexed

Since about 19 November 2026, searching Google for site: plus one page's full address often returns nothing at all , even when that page is in the index.

  • "site:" search returns empty results for indexed pages since Nov 19, 2026
  • 30% of previously reported "not indexed" pages were actually indexed
  • Google never guaranteed site: operator's reliability for indexing checks

More from Monday 23 November →