He had LLMs rewrite his Python science code in Rust and it now answers instantly
A man reimplemented his GIS science code from Python into Rust using LLMs, with a hard test: identical inputs and outputs at 10,000 points. Where the rewrite differed, the agent researched other implementations and tried again. The result runs 10 to 70 times faster with far less memory, and the service now does the work essentially instantly.
How it works
- He sets the done rule: identical input and output pairs at 10,000 points
- The LLM rewrites the code in Rust
- Mismatches send the agent back to research other implementations and retry
- The new service runs 10 to 70 times faster with much lower memory
Why it’s worth knowing
The rewrite was held to a strict rule, same answers at 10,000 test points, and still came out up to 70 times faster.
Where it’s from
Summarized from a public post on news.ycombinator.com. See the original ↗