The Problem: Slow Websites Lose Customers
When visitors hit your website and see nothing for 2 minutes, they leave. We had 10 landing pages at alorny.cloud — 5 of them failing performance benchmarks. Page weights ranged from 4MB to over 9MB. Request counts hit 60 per page. Something had to change.
Enter AutoResearch
Andrej Karpathy released autoresearch — a methodology where AI agents iteratively optimize a target metric through experimentation. The concept is simple: measure, hypothesize, change, measure again, keep improvements, revert regressions.
We applied this to website performance. The target metric: number of failing sites (lower is better). The measurement tool: Playwright-based performance benchmarks checking FCP, LCP, CLS, page weight, and request count.
The Results: 11 Experiments, 100% Pass Rate
Over 11 experiments, the autonomous agent:
- Compressed founder images from 2174KB to 121KB (94% reduction) by converting PNG to optimized JPEG
- Compressed review images across shared directories, saving 4MB per image set
- Aggressively compressed background images behind dark CSS overlays to quality 30 — saving 2.5MB with zero visual difference
- Fixed CLS (Cumulative Layout Shift) in the portfolio site from 0.269 to 0.016 by hiding animated hero elements during the page loader
- Lazy-loaded review images — only 6 load initially, the rest load on scroll — cutting requests from 60 to 27
Key Metrics Before vs After
The improvements were dramatic:
- Site 4 weight: 4,365KB → 993KB (-77%)
- Site 5 weight: 7,983KB → 687KB (-91%)
- Site 7 weight: 9,118KB → 1,625KB (-82%)
- Site 3 CLS: 0.269 → 0.016 (-94%)
- Failing sites: 5 → 0 (100% improvement)
How It Works
The autoresearch loop follows a strict protocol:
- Analyze — Read past experiment results, understand what worked and what failed
- Hypothesize — Choose one specific, focused change to try
- Implement — Make the code change and commit it to git
- Evaluate — Run the measurement suite and capture results
- Decide — Keep improvements, revert regressions
Each experiment is atomic — one change, one measurement, one decision. Git serves as the persistence layer, making every experiment reversible.
Why This Matters for Your Business
At Alorny, we build custom automation solutions including AI-powered optimization tools. The autoresearch methodology isn't limited to websites — it works for any process with a measurable metric: email campaigns, trading strategies, prompt engineering, and more.
If your website takes more than 3 seconds to load, you're losing 53% of mobile visitors (Google data). Autonomous optimization can fix this while you sleep.
Key Takeaways
- AutoResearch works by iteratively measuring, changing, and keeping only improvements
- Image compression is almost always the biggest win for page weight
- Lazy loading can dramatically reduce initial request counts
- CLS issues are often caused by animations running during page load
- The methodology is applicable far beyond websites — any measurable metric can be optimized