Skip to content

Benchmarks ​

HexaGen PHP, Laravel and Symfony, each on FrankenPHP worker mode, on the same machine and measured the same way. The setup is in the repository, so you can run it yourself and check every number.

Results ​

GitHub Actions run 46302595119, 2026-11-29. Requests per second, median of 3 rounds of 30 seconds (higher is better):

/json/db/listMemory
HexaGen PHP 2.4.012,7104,0223,57041 MiB
Symfony 7.4 + Doctrine ORM 3.89,8473,4223,00744–48 MiB
Laravel 12.74 + Octane 2.262,2291,5291,28794–97 MiB

Latency, from the same run (milliseconds, lower is better):

/json p50 / p99/db p50 / p99/list p50 / p99
HexaGen PHP4.97 / 11.4415.30 / 30.9017.33 / 29.78
Symfony6.39 / 14.6318.21 / 28.5520.67 / 30.70
Laravel25.53 / 53.4941.21 / 54.5649.18 / 59.97

No run had a single error. The spread between rounds was under 1% for HexaGen PHP and Laravel, and under 4% for Symfony.

In short:

  • Laravel with Octane: HexaGen PHP handles 5.7 times the requests on the JSON route and 2.6 to 2.8 times on the database routes, with less than half the memory.
  • Symfony: HexaGen PHP is 18% to 29% faster here, with similar p99 latency.

On an earlier run on a different runner, the gap to Symfony was smaller: +17% on /json, +8% on /list, and even (−2%) on /db. The Laravel results matched. Both result sets are in bench/results/.

What runs ​

RouteWork
/jsonReturns {"message":"Hello, World!"}: routing, middleware and the response.
/dbOne row by primary key (random id out of 10,000) through the ORM, as JSON.
/list20 rows through the ORM, as JSON.

Each app is a fresh project from its official skeleton (rbaezc/hexagen-app, laravel/laravel plus Octane, symfony/skeleton plus symfony/orm-pack), with only these three routes added:

  • The ORM is each framework's own: HexaORM, Eloquent and Doctrine.
  • Debug is off, and each project builds its production caches the way its documentation says.
  • The default middleware stays in place. HexaGen PHP runs its global stack. Laravel's routes sit outside the web group, but its global middleware runs.

The conditions are identical for all three:

  • the image dunglas/frankenphp:1-php8.4-alpine (PHP 8.4.28, FrankenPHP 1.14.0) and the same php.ini with OPcache;
  • 2 CPUs and 2 workers per app, one app at a time;
  • PostgreSQL 16 with the same data;
  • wrk in its own container, with 64 connections and a warm-up before each run.

The benchmark README lists every rule, including each framework's worker recycling default.

Why HexaGen PHP is fast here ​

  • It boots once. The kernel, routes and container are built when the worker starts. A request only runs the middleware, the matched controller and the query.
  • Short middleware stack. The global pipeline is a handful of small middlewares, with no session, cookie or view layer unless you add them.
  • Light ORM. HexaORM hydrates rows straight into model properties, with no unit of work or identity map to maintain.

Run it yourself ​

bash
git clone https://github.com/rbaezc/hexagenphp_framework
cd hexagenphp_framework/bench
./run.sh

You need Docker with Compose v2. Results go to bench/results/, with the exact versions under test. You can also start the Benchmarks workflow from the repository's Actions tab.

Caveats ​

These are synthetic, single-route numbers. They show framework and ORM overhead, not how a real application with business logic, caching and I/O behaves. Results depend on the hardware, so compare frameworks within one run, never across machines.

If you think the setup is unfair to any framework, open an issue or a pull request. The goal is a comparison every community accepts.

Released under the MIT License.