A 20-year-old production templating engine just got dramatically faster.
Shopify CEO Tobi Lütke said he ran Andrej Karpathy’s open-source /autoresearch technique on Shopify’s Liquid codebase and got 53% faster combined parse-and-render time with 61% fewer object allocations. He added that the result is probably “somewhat overfit,” but said the ideas inside it are “absolutely amazing.”
That is a wild result on its own. It gets more interesting when you remember what Liquid is: mature, battle-tested infrastructure that powers real storefronts, not a toy benchmark built for social media.
For small businesses, this is the part that matters. If AI code optimization can pull that kind of performance gain out of an old, heavily used codebase with limited human hand-holding, then website performance AI is no longer a futuristic talking point. It is becoming an operational tool.
What happened at Shopify
The public evidence lines up.
Lütke’s X post on March 12 said he ran /autoresearch on the Liquid codebase and saw the 53% speedup and 61% drop in allocations. Alex Volkov’s follow-up post framed the bigger point well: the CEO of Shopify used Karpathy’s method on a templating engine that has been in production for roughly two decades and got a huge improvement.
There is also now a public Shopify Liquid pull request titled “Performance: 53% faster parse+render, 61% fewer allocations.” In that PR, the benchmark table shows:
- Combined parse+render: 7,469µs → 3,534µs
- Parse time: 6,031µs → 2,353µs
- Render time: 1,438µs → 1,146µs
- Object allocations: 62,620 → 24,530
That is not a vague “it felt faster” claim. It is a measured benchmark on a real codebase.
The PR also explains the process: roughly 120 automated experiments in a loop of edit, commit, run tests, benchmark, keep or discard. That is the important part. The win was not just one smart patch. It came from a system that kept trying ideas, measuring the result, and throwing away what did not work.
What autoresearch actually is
Karpathy’s GitHub repo for autoresearch is intentionally simple.
The idea is this: give an AI agent a real codebase, a clear goal, and a repeatable test. Then let it run an iterative loop.
In plain English, the loop looks like this:
- Make a code change.
- Run tests so nothing breaks.
- Run a benchmark.
- Compare the new result to the old one.
- Keep the change if it helps. Throw it out if it hurts.
- Repeat over and over.
That may not sound glamorous, but it is how a lot of good engineering already works. The difference is that the AI can keep cycling through ideas much faster than a human engineer would, especially for narrow optimization work.
Karpathy’s repo describes the setup as an autonomous research loop that modifies code, trains or tests for a fixed time budget, checks whether results improved, and keeps iterating. In the Shopify case, the same basic pattern appears to have been applied to Shopify Liquid performance work.
This is why the story matters. The AI is not magically “understanding everything.” It is operating inside a tightly constrained system with:
- one codebase,
- one measurable goal,
- one validation method,
- and a fast feedback loop.
That is where AI-driven optimization gets practical.
Why this matters for small businesses
Most small businesses are not running Shopify’s core engine. That is obvious. But a lot of them are running something structurally similar: old code, slow pages, plugins piled on over time, and a website nobody wants to touch because it still mostly works.
That kind of technical debt quietly costs money.
A slow website can mean:
- lower conversion rates
- worse search visibility
- higher bounce rates
- more expensive paid traffic
- frustrated staff stuck with clunky internal tools
Normally, performance work on an aging codebase is expensive because it is hard to justify. You need somebody technical enough to profile the system, test changes carefully, and avoid breaking production behavior. Many SMBs put it off for years.
This is where the Shopify result changes the conversation.
It suggests that AI can help with the boring, expensive middle of the job: trying many small performance ideas, validating them, and surfacing the ones worth keeping. Not replacing engineers entirely. Making engineering time go further.
That opens the door for smaller companies that do not have a deep bench of developers.
If AI can help optimize a legacy templating engine, it can also help find waste in:
- bloated ecommerce themes
- slow WordPress plugins
- custom quoting tools
- old Rails or PHP apps
- internal dashboards that got messy over time
The big shift is not that every small business now needs an autonomous coding lab. The shift is that performance engineering is becoming more accessible.
What small businesses should do now
Do not read this story and decide to unleash an agent on production tonight. That would be reckless.
The smart move is more boring and more useful.
Start with a shortlist of systems where speed affects revenue or operations. Usually that means a website, checkout flow, booking flow, or an internal tool your team touches all day.
Then ask four practical questions:
- Where is the slowdown? Page load, server render time, database queries, third-party scripts, or front-end bloat?
- Can it be measured? If you cannot benchmark it, you cannot improve it reliably.
- Can it be tested safely? AI needs guardrails. Good tests matter.
- Is the bottleneck valuable enough to fix? Not every slow system deserves a project.
From there, the best near-term use of AI is not “rewrite everything.” It is targeted optimization:
- profiling a slow path
- proposing controlled code changes
- running benchmark loops
- comparing versions
- documenting what improved and what did not
That is a very realistic service model for SMBs over the next year.
The Shopify story is impressive because of the number: 53%. But the deeper lesson is that AI is getting useful at a kind of work businesses usually ignore until it becomes painful.
If your site is slow, your app feels heavier every year, or your team keeps living with performance problems because a full rebuild feels too expensive, this is your signal to stop treating optimization as a luxury.
It is starting to look more like a leverage play.
And if you want help finding the highest-impact place to apply AI code optimization in your business, contact us.
