Benchmarks
Nevela is a Laravel package, so the question isn’t whether it is faster than Laravel. It can’t be. The question is what it costs: how many requests a second an API generated by Nevela gives up, next to the same API written by hand. And then, how much faster all of it gets on Octane.
Five apps answer the same products API with the same JSON, one at a time, against one Postgres:
| App | What it is |
|---|---|
| Laravel | Laravel 13, a products controller written by hand. Plain Eloquent and arrays, no API Resources, no policy. Nobody signs in. |
| Laravel + Sanctum | The same app with its routes behind auth:sanctum. What signing in costs on its own. |
| Nevela | The Laravel app create-nevela makes, with the products API generated by nevela resource Product --fields="name:string, sku:string!, description:text?, price:money, stock:int, active:boolean". Signed in as the administrator, as the dashboard is. Not one line written by hand. |
| Laravel + Sanctum, Octane | Laravel + Sanctum, served by Octane on FrankenPHP instead of nginx and PHP-FPM. |
| Nevela, Octane | Nevela, the same way. |
PHP-FPM starts the app afresh for every request. Octane starts it once per worker and keeps it, so a request skips Laravel’s startup.
Results
Section titled “Results”Measured on 19 October 2026, on a GitHub runner, with Nevela as it is after 0.11.0 (with the change below, which is in the next release):
machine: 4 CPUs (AMD EPYC 9V74), 16 GB, Ubuntu 24.04limits: each app 1 CPU and 8 workers (PHP-FPM or Octane), Postgres 2 CPUsload: 50 virtual users, 30 seconds a run, 3 runs of each, the median reportedphp 8.4, Laravel 13.37.0, Octane 2 on FrankenPHP 1.13.1Requests a second on PHP-FPM (more is better):
| Scenario | Laravel | Laravel + Sanctum | Nevela | Nevela against Laravel + Sanctum |
|---|---|---|---|---|
show: one product by its id |
276 | 199 | 173 | 0.87× |
list: a page of 20, and the total |
171 | 136 | 113 | 0.83× |
write: validate and insert |
234 | 177 | 145 | 0.82× |
mixed: 85% list, 10% show, 5% write |
186 | 148 | 127 | 0.86× |
And on Octane:
| Scenario | Laravel + Sanctum | Nevela | Nevela against Laravel + Sanctum | Nevela, Octane against Nevela, PHP-FPM |
|---|---|---|---|---|
show |
388 | 313 | 0.81× | 1.81× |
list |
188 | 162 | 0.86× | 1.43× |
write |
307 | 227 | 0.74× | 1.56× |
mixed |
207 | 176 | 0.85× | 1.39× |
In every row the app was the limit: its one CPU was at 100% while Postgres had room. So these are each app’s ceiling on one CPU, not the database’s. The three runs of each app were within 11% of each other, and never overlapped another app’s.
Median time to answer, at that load:
| Scenario | Laravel | Laravel + Sanctum | Nevela | Laravel + Sanctum, Octane | Nevela, Octane |
|---|---|---|---|---|---|
show |
193 ms | 273 ms | 296 ms | 117 ms | 180 ms |
list |
296 ms | 380 ms | 426 ms | 276 ms | 304 ms |
write |
204 ms | 294 ms | 319 ms | 183 ms | 208 ms |
mixed |
285 ms | 329 ms | 400 ms | 239 ms | 295 ms |
These times are mostly waiting. Fifty users are sending requests as fast as they get answers, to eight workers on one CPU, so a request spends most of its time in the queue. They show how the apps compare when full, not how long one request takes on its own: an app that isn’t full answers in a few milliseconds.
What the numbers say
Section titled “What the numbers say”Signing in costs more than Nevela does. Putting the hand-written routes behind Sanctum takes 20 to 28% off. Every request looks up its token and its user, and every second or so writes when the token was last used. An API people sign in to pays this whatever it is built with.
Nevela’s own work costs 13 to 18% on top. Against Laravel with Sanctum, the fair comparison since Nevela’s API always asks for a sign-in, Nevela serves about five requests for every six.
Against an open API written by hand, Nevela serves 62 to 68% as many requests. That is the price of sign-in, roles and permissions, validation, the trash, and a list API with sorting, search and filters, none of which anyone wrote.
Octane makes Nevela 1.4 to 1.8 times as fast. It gains most where a request does least, a single product, because there Laravel’s startup was most of the work. A page of 20 gains least: building the rows and counting them is the same work either way. On Octane, Nevela serves about as many requests as the hand-written app with no sign-in does on PHP-FPM (0.95 to 1.13×).
Where Nevela loses, and why
Section titled “Where Nevela loses, and why”For one product, the hand-written app with Sanctum asks Postgres three things: the token, the user, the product. Nevela asks four: the same three, and the user’s roles, for the permission check (products.view). An administrator’s are looked up like anyone else’s. That is the cost of permissions, which the plain app doesn’t check.
A write also reads the new product back after inserting it, so the answer has every column as the database stored it. Writes are where Nevela is furthest behind.
On top of the queries, the generated code does more in PHP: an API Resource for each product, a policy check on each request, and a form request for each write. The app’s CPU was the limit, and building and running a query costs CPU too, so which of these costs the most isn’t measured separately here.
On Octane the gap is a little wider (0.74 to 0.86× against Laravel with Sanctum), because Laravel’s startup no longer hides it: what is left of a request is the work each app does, and Nevela does more of it.
What changed after the first run
Section titled “What changed after the first run”The first run, with Nevela 0.11.0, found Nevela asking six things for one product, not four. Two were about the database itself:
- Whether the roles table exists, so an app that has been upgraded and not yet migrated keeps working: until the table is there, everyone may do everything, as before.
- Whether the products table has
deleted_at, for the same reason: the trash only applies once its migration has run.
Nevela remembered each answer, but only for one request, and PHP-FPM starts every request afresh, so a deployed app asked them on every request. Now a yes is kept across requests (in bootstrap/cache/nevela-schema.json) and forgotten when migrations run. Against Laravel with Sanctum, measured on runners with the same CPU (an AMD EPYC 7763), before and after:
| Scenario | 0.11.0 | Now |
|---|---|---|
show |
0.79× | 0.86× |
list |
0.82× | 0.88× |
write |
0.82× | 0.83× |
mixed |
0.83× | 0.87× |
On a single read, Postgres’s CPU went from 57% to 26%.
Fair to all of them
Section titled “Fair to all of them”The harness follows Grit’s, whose page this one is modelled on, and keeps its rules:
- Production setup for every app. OPcache with its tracing JIT, a production Composer autoloader,
APP_DEBUG=falseandartisan optimize. nginx and PHP-FPM for three of the apps, Octane on FrankenPHP for two, each named as such. Neverartisan serve. - The same everything else. The same CPUs, memory and number of workers for each app, the same Postgres, the same table (checked before anything is measured), the same 10,000 rows from a seeded generator, put back before every run.
- One app at a time, with the others stopped. A warm-up before each run, not counted. The apps take turns, so a runner that slows down slows them all.
- The median of three runs, never the best one.
- The same JSON from each app. The hand-written app takes the same
page,perPage,sortandqas Nevela’s, and returns the same{ data, meta }with the same keys, so neither does less work by answering a simpler question. - Octane as it ships. Each worker is replaced after 500 requests, Octane’s default.
A shared GitHub runner is not a quiet machine, which is why the apps are compared within one run and not across runs. On another machine the numbers will differ, and the ratios between the apps should hold. They did across runners: on an AMD EPYC 7763 the same day, every app served fewer requests a second, and Nevela against Laravel with Sanctum on PHP-FPM came out at 0.83 to 0.88×, against 0.82 to 0.87× above.
Run it yourself
Section titled “Run it yourself”The harness is in the repository, under benchmarks/. It needs Docker with Compose, Node, and about 4 GB of free memory:
git clone https://github.com/MarkColeMukisa/nevela.gitcd nevela/benchmarks./run.sh check # every app answers every scenario; nothing kept./run.sh # about an hournode report.mjs # the tables, from results/latestIt builds the Nevela app from the package in your checkout, so it measures the code as it is now. APPS="laravel-auth nevela" measures fewer apps. On a machine with more cores, give the apps what Grit’s harness does: APP_CPUS=4 PG_CPUS=8 FPM_WORKERS=32 ./run.sh.
It also runs on GitHub as the Benchmark workflow, by hand from the Actions tab and on any pull request that changes benchmarks/. The tables are in the run’s summary.