A Fair Benchmark: Rust, Go, Python, Laravel and WordPress
One blog app on twelve runtimes under the same rules: requests per second and memory for Go, Rust with and without the Rustango ORM, Python, Laravel and WordPress, and what makes each one faster or slower where it is.
The same blog app on twelve runtimes: Go, Rust with and without the Rustango ORM, a Python framework on four servers, Laravel and WordPress. Every app serves the same data and the same HTML under the same CPU, memory and connection limits. Measured on 13 October 2026 (Python servers on 14 October) on an Apple M3 Pro (Docker VM with 12 CPUs and 16 GB).
Versions: rustc 1.99.0, Go 1.25.14, PHP 8.3.35, Laravel 13.36.0, Swoole 6.2.3, WordPress 6.9.10, PostgreSQL 16, MySQL 8.4, Redis 7. Rustango 0.60.7 was measured in a second run next to axum + sqlx; the other numbers come from the main run.
Round 2 profiles every gap between Go and the Rust apps and re-tests the Rust frameworks one at a time: Benchmark Round 2.
- +34% plain Rust vs Go on the uncached index
- 2.2× cached throughput vs Go
- 0.45 ms p99 on cached pages (Go: 2.0–2.4 ms)
- 7 MiB RAM under load (Go: 21 MiB)
- 94–104% Rustango 0.60.7 vs raw sqlx, same run
The workload
Every app serves the same blog: 10 authors, 30 tags, 1 000 posts, 2 600 post-tag links and 10 000 comments, seeded deterministically. Six routes:
/: the latest 20 posts with author, tags and comment count/post/{slug}: one post with author, tags and every comment/tag/{slug}: the latest 20 posts carrying a tag/cachedand/post/{slug}/cached: the same pages from a Redis page cache/compute: sum of every prime below 20 000 by trial division, no database
Twelve runtimes: Go (stdlib net/http + pgx), Rustango on axum and on actix-web, plain axum and actix-web with raw sqlx and Go's exact SQL, a Python framework on gunicorn (sync WSGI) and on Hypercorn, Uvicorn and Granian (async views, ASGI), Laravel on php-fpm and on Octane, and WordPress.
The rules
- Every app gets the same 4 CPUs (pinned to cores 0–3) and 2 GB RAM. Go, Tokio and actix-web run exactly 4 workers.
- PostgreSQL, MySQL and Redis run on cores 4–7; the load generator, oha, runs on cores 8–11 inside the Docker network.
- 16 database connections per app. The compiled apps all issue Go's query plan (3 queries for the index and detail, 4 for the tag page); the Rust apps without an ORM use Go's SQL text verbatim.
- Before any load, every page from every app is compared with Go's HTML. A mismatch stops the run.
- No compression anywhere, so every app sends the same bytes.
- Production settings: OPcache,
php artisan optimize, pooled connections, debug off, release builds with LTO. - 5 s warm-up, then three 20 s runs per endpoint at 50 connections; the median counts, and only HTTP 200 responses count.
The harness
Compiled runtimes
Requests per second, higher is better:
Uncached pages
Same SQL, same HTML, 50 connections
req/s · higher is better- Go
- Rust
Rustango is in its own chart below.
Cached pages
Served from a Redis page cache
req/s · higher is better- Go
- Rustango
- Rust
Rustango rows: 0.60.6. A cache hit runs no SQL, so the 0.60.7 decoding change does not apply to it.
Compute
Primes below 20 000, no database
req/s · higher is better- Go
- Rust
Rustango vs raw sqlx
Rustango 0.60.7 on axum against plain axum + sqlx: same server, same three queries, same HTML. This is a separate run on 13 October, with axum + sqlx measured again next to it.
Rustango 0.60.7 vs axum + sqlx
Separate run, same method
req/s · higher is better- Rust
- Rustango
The index varied between runs; comparing each app's best run, Rustango is at 93% of axum + sqlx there.
Where Rustango spends CPU, from perf profiles of the uncached pages. The CPU shares were measured on 0.60.6:
| Cost | CPU share | Ticket | Status |
|---|---|---|---|
| Postgres values decoded by trying ~10 types per cell, each miss building an error | 46% on the index (4.9% in 0.60.7) | #2655 | Fixed in 0.60.7 |
CachePageLayer stores pages as JSON + base64 | ~21% per cached hit | #2656 | Open |
A HashMap with owned keys for every aggregate row | 6–7% | #2661 | Fixed in 0.60.7 |
| Querysets rebuilt and compiled on every request | ~2% | #2662 | Partly fixed |
Missing query API that the benchmark had to work around: related columns in values_list (#2657), = ANY($1) array binds (#2658) and batch many-to-many prefetch (#2659). All open.
One breaking change in 0.60.7: on MySQL and SQLite, values() now returns I16/I32/F32 for SMALLINT/INT/REAL, like PostgreSQL, instead of I64/F64.
Interpreted runtimes
Same rules. Requests per second:
Uncached pages
Same SQL shape, same HTML, 50 connections
req/s · higher is better- Python
- PHP · Laravel
- WordPress
Python servers: one run on 14 October. PHP runtimes: 13 October. The three ASGI servers are in the Python chart below.
Cached pages
Served from a Redis page cache
req/s · higher is better- Python
- PHP · Laravel
- WordPress
Python servers: one run on 14 October. PHP runtimes: 13 October.
Compute
Primes below 20 000, no database
req/s · higher is better- Python
- Python, ASGI
- PHP · Laravel
- WordPress
Python servers: one run on 14 October. PHP runtimes: 13 October.
Python: four servers
Same app: sync views on gunicorn, async views on the three ASGI servers
req/s · higher is better- Python
- Python, ASGI
One run on 14 October. Detail, cached: gunicorn 11 848, Hypercorn 5 085, Uvicorn 6 215, Granian 7 810.
Memory
Memory under load
Resident memory of the app container on the uncached index, one scale for all
MiB · lower is better- Rust
- Go
- PHP · Laravel
- WordPress
- Python
- Python, ASGI
Python servers: one run on 14 October. PHP runtimes: 13 October.
Why: what is faster where
- Uncached index and detail, Rust vs Go: with the same SQL, axum + sqlx is 34% faster than Go on the index and Go is 22% faster on detail. The cause of this split has not been profiled.
- Tag page: PostgreSQL used 3.65 of its 4 cores on this route, so the compiled apps hit the same database limit: Go and plain Rust at 5 900–6 500 req/s, Rustango 0.60.7 at 6 023.
- Cached pages: the Rust apps serve 1.5–2.2× Go's requests, with a p99 around 0.45 ms against Go's 2.0–2.4 ms. The cause has not been profiled.
- Compute: Go serves 10% more requests than the Rust apps, but its p99 (10.8 ms) is 2–3× theirs.
- Rustango vs raw sqlx: 0.60.7 decodes each column once by its type; decoding is 4.9% of the CPU, the same as raw sqlx's typed reads (5.0%). The rest of the CPU is shared by both apps: Tera rendering about 26%, the pool's connection check on acquire about 18%.
- actix-web vs axum: the actix apps use 272–296% of their 400% CPU budget with a shared sqlx pool and trail axum on uncached pages. The cause has not been found (#2660).
- WordPress, cached: its
advanced-cache.phpdrop-in answers from Redis before WordPress loads: 21 000 req/s, the fastest interpreted result. Uncached, it runs 11–13 queries per page on MySQL (it does not support PostgreSQL). - Laravel, cached: Laravel runs its middleware stack before
Cache::remember, so cache hits stay at 3 000–6 000 req/s. - Laravel, php-fpm vs Octane: php-fpm boots the framework for every request; Octane keeps it resident in a Swoole worker. Octane is 2–3× faster on uncached pages and about equal on compute.
- Python, sync vs async: the framework's async ORM runs the sync ORM in a thread and has no async database pool, and its ASGI handler creates a thread executor per request plus about 3 thread hops. On the uncached index all four servers are equal (663–697 req/s); on detail and tag gunicorn is 1.4–1.8× faster.
- Python, cached: the async cache path does less work, one Redis GET of the stored HTML against gunicorn's two GETs and an unpickle, and is still 1.4–2.3× slower than gunicorn.
- Python, ASGI servers: Granian is faster than Uvicorn, and Uvicorn than Hypercorn, on the cached, detail and tag pages. The cause of this gap has not been profiled.
- Compute, PHP vs Python: PHP 8.3 with OPcache runs the integer loop about 4× faster than CPython.
- Interpreted vs compiled, uncached: the best interpreted result is 6–11× behind Go and plain Rust on index and detail, and about 5× on the tag page.
- Memory: the Rust apps run in 7–8 MiB under load, Go in 17–21 MiB, the interpreted runtimes in 89–293 MiB.
The full tables, latencies, footprints and method are in the Rustango docs.