A study of 3.52 million changes: AI-written code passes the tests and ships to production, but costs more in review and resources
A study of 3.52 million C++ changes: AI-written code is rolled back less often, but triggers 1.92ร blocking review threads and uses more compute and memory.

Luca Di Domenico
ยท 2 min read
In short
A study of 3.52 million C++ changes inside a large tech company tracked AI-generated code for a year, from the moment it was written to the moment it shipped: it passes the tests, gets reverted less often than human code, and by March 2026 it accounted for more than two out of every three lines with known provenance. The cost shows up later, for the same amount of work: 1.92ร the review threads that block a change, 1.39ร the comments, nearly 2ร the loops, 30-40% fewer calls to standard libraries, +5% compute and +8% memory. Writing code was already the cheap part; review, maintenance and efficiency cost more, and AI has mostly accelerated the first one. Four countermeasures: measure the total cost instead of just the PRs, make the agent look for existing libraries and helpers, give it the architectural context, and in review look at logic, duplication and unnecessary detours.
๐ A study of 3.52 million changes inside a large tech company reaches an interesting conclusion: AI-written code passes the tests, ships to production and gets reverted less often than human code. But it costs more.
A year of C++ code tracked from writing to production
For a year, the researchers tracked AI-generated C++ code from the moment it was written to the moment it shipped. By March 2026, more than two out of every three lines with known provenance were written by a model.
The cost shows up later.
What costs more, for the same amount of work
For the same amount of work:
- 1.92ร more review threads that block the change
- 1.39ร more comments
- nearly 2ร the loops in the code
- 30-40% fewer calls to standard libraries
- +5% compute
- +8% memory
The numbers come from the paper Characterizing the Quality Profile of AI-Generated C++ in Production, published on arXiv on 6 August 2026 by Google researchers: 3.52 million changes between April 2025 and April 2026, revert rate of AI code around 0.9ร compared to human code, share of AI code with known provenance up from 28.99% to 68.62%. LeadDev covered the study on 20 August 2026 with the same figures.
The point the researchers make is this: writing code was already a relatively cheap part of the job. Review, maintenance and efficiency cost far more.
AI has mostly accelerated the first one.
Four things to do when a model writes much of your code
๐ก What this means, now that a model writes a good chunk of your teamโs code:
- 1) Measure the total cost, not just how many PRs you ship.
- 2) Have the agent look for existing libraries and helpers before it writes new code.
- 3) Give it the architectural context, not just the task.
- 4) In review, focus on logic, duplication and unnecessary detours.
How I flipped my time between architecture and code
In my own work, since I work alone, I changed my approach completely: today I spend around 80% of my time planning architecture and features at product level, and 20% having AI write code. It used to be the other way around.
Itโs the same balance I apply in custom software development projects for companies: more time on the architecture, less on writing the code.
Iโm curious how you work: freelancers, developers in a team, or people doing vibe coding. The approach changes a lot depending on the project and the size of the team.
How do you organize it? Let me know in the comments ๐๐ป
Sources
- Characterizing the Quality Profile of AI-Generated C++ in Production โ arXiv:2608.06640 โ Paper by Google researchers (Tran, Lewis, Yang, Thakur, Kini, Patil, Hashemi, Ranganathan), published on arXiv on 6 August 2026. It analyzes 3.52 million C++ changes from April 2025 to April 2026: revert rate of AI changes ~0.9ร compared to human ones, 1.92ร blocking threads and 1.39ร comments in review, ~2ร explicit loops and ~0.4ร uses of std::*, compute up 5% and memory up 8% in relative terms, share of AI code with known provenance rising from 28.99% in April 2025 to 68.62% in March 2026
- AI code is correct and still costs you more โ LeadDev โ Article from 20 August 2026 covering the study: it independently confirms the 3.52 million changes, 1.92ร blocking threads, 1.39ร comments, nearly twice the loops, 30-40% fewer calls to standard libraries, +5% compute and +8% memory, and the more than two out of three lines written by AI in March 2026
Want to know what this means for your product?
If you're building software with AI and want a second opinion on how you're working, tell me about your project.