It's still incredible to me that you can just point the model at things and make them better continuously.
Codex found an easy 5-10% speed-up in the formatter while I was doing other work.
While focused on unrelated tasks, Astral founder Charlie Marsh let OpenAI's Codex scan the Ruff formatter codebase and surface a simple caching improvement for parenthesized expressions that delivered a measured 6.4 percent overall speedup once merged.
It's still incredible to me that you can just point the model at things and make them better continuously.
Codex found an easy 5-10% speed-up in the formatter while I was doing other work.
The model autonomously proposed indexing boundaries for TrivialRanges and ParenthesizedExpressions, producing PR #26344 that cleared review and benchmarks without Marsh steering the actual change.
Marsh has shown similar Codex experiments before, yet the exact prompting approach and whether comparable wins appear in other Ruff modules remain open details beyond this formatter case.
Users are excited by Codex AI autonomously delivering performance gains in the Ruff formatter because it showcases rapid progress in AI agents optimizing code and workflows.
No Digg Deeper questions have been answered for this story yet.
Codex for autonomously optimising your work:
It's still incredible to me that you can just point the model at things and make them better continuously.
Codex found an easy 5-10% speed-up in the formatter while I was doing other work.
Thanks Charlie for the tokens - this optimization has sped up oxc's formatter by ~5% as well!
I asked it to try again and it found another easy 5% speed-up.
I asked it to try again and it found another easy 5% speed-up.
It's still incredible to me that you can just point the model at things and make them better continuously.
Codex found an easy 5-10% speed-up in the formatter while I was doing other work.
https://github.com/astral-sh/ruff/pull/26344
https://github.com/astral-sh/ruff/pull/26429
I asked it to try again and it found another easy 5% speed-up.

@charliermarsh Auto-optimizing code while you scroll Twitter? That’s just unfair.
I’ve recently taken to finding my major bottlenecks when processing large datasets with spark and having codex write the heavy inner worker logic in rust.
Whenever I have spare time I just let it cook on improving the speed. I pretty frequently get little 1-2% speed ups while I’m responding to slack or in meetings. (On top of the 2-4x speed up from the original rust port)
All it costs is a little laptop battery and my codex rate limit resets I’ve been collecting.
Agents can just do things
This code probably runs over, I don't know, billions of files per day?
I asked it to try again and it found another easy 5% speed-up.
@charliermarsh at this point you should give your codex a promotion and a nice beefy machine to do what needs doing!
It's still incredible to me that you can just point the model at things and make them better continuously.
Codex found an easy 5-10% speed-up in the formatter while I was doing other work.
Agents can just do things
It's still incredible to me that you can just point the model at things and make them better continuously.
Codex found an easy 5-10% speed-up in the formatter while I was doing other work.

@Cameron_C2 Love it

@charliermarsh We live in an age of wonders

@reach_vb I would love to do a openai hackathon in my city any support @reach_vb

https://github.com/oxc-project/oxc/pull/23982 (ignore the codspeed benchmarks showing no diff, jsdelivr is down which is causing us issuees)

@charliermarsh If you /goal it could you optimize more?

@code_star it is wild how quickly they are getting agents to ship

@code_star that is such a cool way to optimize your workflow.