I've got an agent in a loop optimizing a renderer
Mitchell Hashimoto@mitchellhI've got an agent in a loop optimizing a renderer with the goal to minimize frame times (and tests to measure). It got times down from 88ms to 2ms and allocations down from ~150K to 500. This is exactly why agent psychosis is a big fucking problem.
- ▪Mitchell Hashimoto@mitchellhI've got an agent in a loop optimizing a renderer with the goal to minimize frame times (and tests to measure).
- ▪It got times down from 88ms to 2ms and allocations down from ~150K to 500.
- ▪This is exactly why agent psychosis is a big fucking problem.
Opening excerpt (first ~120 words) tap to expand
Mitchell Hashimoto@mitchellhI've got an agent in a loop optimizing a renderer with the goal to minimize frame times (and tests to measure). It got times down from 88ms to 2ms and allocations down from ~150K to 500. Sounds good, right? Wrong. This is exactly why agent psychosis is a big fucking problem. As an experiment, I rewrote the Ghostty core render state in Go, with access to identically laid out data structures as Ghostty and the exact same validation tests. I made a purposely naive renderer (simple, correct, but slow). 88ms per frame with 150,000 allocations (horrendous, lol)! I then kickstarted a Ralph loop to bring the frame times down. I told it it can't modify input data structures or the public API or tests (they're correct), but it can do anything else it wants.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at X (formerly Twitter).