I asked Codex how much electricity it would take to rewrite every Python program on Earth in Rust. It came back with a power bill.
The middle scenario came out to about 72 GWh upfront. That includes the AI reading code and generating Rust, plus an allowance for builds, tests and running both versions during the switch. My lower and upper scenarios were 6 and 450 GWh. The public GitHub corpus I started from has 159 million Python files. I had to guess how much code exists outside it, and how many times the agent would have to try again. For comparison, GitHub reported 600 million generated tokens for its own TypeScript-to-Rust runtime port. Python corpus · GitHub’s port · Inference energy study
(Codex used the phrase “water consumed,” so I asked if the cooling tower had launched the water into space. I was giving it a hard time about the verb. In water accounting, evaporation counts as consumption because it takes water out of the local supply. Earth gets to keep the molecules.) Berkeley Lab data-centre water accounting
Once the rollout is done, saving about 8 MW continuously worldwide pays back 72 GWh in a year. That’s about 0.015% of the electricity the world’s data centres used in 2025. The missing number is how much of that electricity goes to Python work that Rust could actually make cheaper. A loop that runs on every request is a good candidate. A script that renamed twelve PDFs in 2019 can sit this one out. IEA data-centre electricity figures