Rust 2026-10-13·Ievgenii Svyryd

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.

A Fair Benchmark: Rust, Go, Python, Laravel and WordPress

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
  • /cached and /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

DOCKER NETWORK · NO COMPRESSION oha load generator 8 9 10 11 CORES 8–11 App under test 4 CPUs · 2 GB · 4 workers 0 1 2 3 CORES 0–3 · PINNED Databases Postgres · MySQL · Redis 4 5 6 7 CORES 4–7 HTTP 50 conns SQL · cache 16 conns ✓ HTML parity vs Go, before any load PER ENDPOINT 5 s run 1 · 20 s run 2 · 20 s run 3 · 20 s WARM-UP → MEDIAN OF 3 · HTTP 200 ONLY DOCKER NETWORK oha load generator CORES 8–11 8 9 10 11 HTTP 50 conns ✓ HTML parity vs Go App under test 4 CPUs · 2 GB · 4 workers CORES 0–3 0 1 2 3 SQL · cache · 16 conns Databases PostgreSQL · MySQL · Redis CORES 4–7 4 5 6 7 PER ENDPOINT 20 s 20 s 20 s 5 S WARM-UP → MEDIAN OF 3

Compiled runtimes

Requests per second, higher is better:

Uncached pages

Same SQL, same HTML, 50 connections

req/s · higher is better
  • Go
  • Rust
Index
Go 9 360 req/s
axum + sqlx 12 505 req/sfastest
actix + sqlx 9 963 req/s
Detail
Go 22 675 req/sfastest
axum + sqlx 18 578 req/s
actix + sqlx 14 697 req/s
Tag
Go 6 457 req/sfastest
axum + sqlx 6 299 req/s
actix + sqlx 5 903 req/s

Rustango is in its own chart below.

Cached pages

Served from a Redis page cache

req/s · higher is better
  • Go
  • Rustango
  • Rust
Index, cached
Go 96 214 req/s
Rustango · axum 164 942 req/s
Rustango · actix 200 167 req/s
axum + sqlx 214 097 req/sfastest
actix + sqlx 197 252 req/s
Detail, cached
Go 143 795 req/s
Rustango · axum 194 939 req/s
Rustango · actix 214 662 req/s
axum + sqlx 233 669 req/sfastest
actix + sqlx 211 293 req/s

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
Go 16 588 req/sfastest
axum + sqlx 15 085 req/s
actix + sqlx 14 741 req/s

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
Index
axum + sqlx 10 750 req/s
Rustango 0.60.7 11 143 req/sfastest
Detail
axum + sqlx 17 907 req/sfastest
Rustango 0.60.7 16 875 req/s
Tag
axum + sqlx 6 242 req/sfastest
Rustango 0.60.7 6 023 req/s
Compute
axum + sqlx 15 091 req/sfastest
Rustango 0.60.7 15 084 req/s

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:

CostCPU shareTicketStatus
Postgres values decoded by trying ~10 types per cell, each miss building an error46% on the index (4.9% in 0.60.7)#2655Fixed in 0.60.7
CachePageLayer stores pages as JSON + base64~21% per cached hit#2656Open
A HashMap with owned keys for every aggregate row6–7%#2661Fixed in 0.60.7
Querysets rebuilt and compiled on every request~2%#2662Partly 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
Index
Python · gunicorn 697 req/s
Laravel · php-fpm 518 req/s
Laravel · Octane 1 098 req/sfastest
WordPress 599 req/s
Detail
Python · gunicorn 2 778 req/sfastest
Laravel · php-fpm 572 req/s
Laravel · Octane 1 712 req/s
WordPress 687 req/s
Tag
Python · gunicorn 1 411 req/sfastest
Laravel · php-fpm 490 req/s
Laravel · Octane 1 102 req/s
WordPress 647 req/s

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
Index, cached
Python · gunicorn 11 012 req/s
Laravel · php-fpm 3 326 req/s
Laravel · Octane 5 884 req/s
WordPress 21 285 req/sfastest
Detail, cached
Python · gunicorn 11 848 req/s
Laravel · php-fpm 3 013 req/s
Laravel · Octane 5 836 req/s
WordPress 21 591 req/sfastest

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 · gunicorn 422 req/s
Python · Hypercorn 388 req/s
Python · Uvicorn 385 req/s
Python · Granian 404 req/s
Laravel · php-fpm 1 611 req/sfastest
Laravel · Octane 1 521 req/s
WordPress 732 req/s

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
Index
Python · gunicorn 697 req/sfastest
Python · Hypercorn 663 req/s
Python · Uvicorn 675 req/s
Python · Granian 692 req/s
Index, cached
Python · gunicorn 11 012 req/sfastest
Python · Hypercorn 5 151 req/s
Python · Uvicorn 6 233 req/s
Python · Granian 7 706 req/s
Detail
Python · gunicorn 2 778 req/sfastest
Python · Hypercorn 1 550 req/s
Python · Uvicorn 1 654 req/s
Python · Granian 1 854 req/s
Tag
Python · gunicorn 1 411 req/sfastest
Python · Hypercorn 906 req/s
Python · Uvicorn 948 req/s
Python · Granian 1 020 req/s

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
Compiled
Rust apps (all four) 6.9–7.5 MiBlowest
Go 21.2 MiB
Interpreted
Laravel · php-fpm 89 MiBlowest
WordPress 142 MiB
Python · gunicorn 224 MiB
Laravel · Octane 241 MiB
Python · Uvicorn 249 MiB
Python · Hypercorn 255 MiB
Python · Granian 293 MiB

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.php drop-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.

Get in touch →