Skip to content
...

PHP ORM Benchmarks ​

How much an ORM costs compared to the queries you would write by hand. Every ORM runs the same scenarios on the same data, and every result is divided by the time of hand-written PDO measured on the same machine in the same run: 3.0× means three times slower than plain PDO.

The numbers come from php-testo/benchmarks-orm. Each release of that repository benchmarks the ORM versions it pins and publishes the run here, so you can go back to any earlier run and see how the ORMs changed between versions.

Date
December 2, 2026
PHP
8.5.13

Versions under test

Machine: SQLite 3.45.1 · AMD EPYC 7763 64-Core Processor, 4 cores · ubuntu24 20261122.23.1 · PHP 8.5.13

Overall

Geometric mean of the time relative to hand-written PDO across all scenarios. Lower is better.

Yii ActiveRecord8.48×
Cycle DataMapper9.28×
Doctrine ORM9.49×
Cycle ActiveRecord12.10×
Eloquent15.75×

Scenarios

Hover a scenario to see what it does, a cell for the time per operation, its spread and the peak memory. The best result in each row is bold.

ScenarioPDO Cycle DM Cycle AR Doctrine Eloquent Yii AR
Reads
Find by primary key3.8 µs23.8×29.9×33.3×47.1×26.5×
List of 10 rows18.4 µs10.4×12.7×14.6×15.7×9.7×
List of 100 rows151 µs6.0×7.0×7.7×7.9×4.7×
List of 1000 rows1.49 ms4.5×5.2×5.9×4.5×2.8×
100 rows fetched again151 µs3.7×3.6×5.2×7.9×4.7×
100 rows as arrays47.9 µs9.0×10.1×12.2×8.6×13.0×
Relations
Eager belongs-to, 100 posts225 µs9.7×10.5×7.5×12.4×5.8×
Eager has-many, 20 users457 µs5.8×6.2×6.3×7.2×3.9×
Lazy belongs-to, 100 posts220 µs9.0×9.9×11.6×63.2×29.0×
Bulk
All 10 000 posts16.24 ms4.9×5.5×5.7×4.3×2.8×
Writes
Insert 100 users396 µs14.5×31.5×9.9×36.1×16.3×
Insert 20 users + 100 posts558 µs12.9×17.9×8.6×33.5×14.2×
Update 100 users299 µs22.2×42.8×11.5×46.5×14.1×
Delete 100 posts306 µs15.0×32.6×11.4×24.2×8.3×

Head to head

How many times one ORM is faster than the other in each scenario.

vs
← Cycle DataMapper fasterCycle ActiveRecord faster →
Find by primary key1.26×
List of 10 rows1.21×
List of 100 rows1.17×
List of 1000 rows1.15×
100 rows fetched again1.03×
100 rows as arrays1.12×
Eager belongs-to, 100 posts1.09×
Eager has-many, 20 users1.07×
Lazy belongs-to, 100 posts1.11×
All 10 000 posts1.13×
Insert 100 users2.17×
Insert 20 users + 100 posts1.39×
Update 100 users1.93×
Delete 100 posts2.17×
Overall1.30×

Across databases

Time of one ORM divided by the time of PDO on the same database. The cost of the ORM itself barely depends on the database, so the columns show which database is faster: the larger the number, the smaller the share of the database query.

ScenarioSQLite (in memory)PostgreSQLMySQL
Find by primary key23.8× 1.8× 2.1×
List of 10 rows10.4× 2.1× 3.1×
List of 100 rows6.0× 3.1× 3.8×
List of 1000 rows4.5× 2.8× 3.0×
100 rows fetched again3.7× 2.0× 2.1×
100 rows as arrays9.0× 2.5× 3.3×
Eager belongs-to, 100 posts9.7× 3.2× 5.1×
Eager has-many, 20 users5.8× 3.0× 3.4×
Lazy belongs-to, 100 posts9.0× 2.1× 2.4×
All 10 000 posts4.9× 3.1× 3.4×
Insert 100 users14.5× 1.5× 1.7×
Insert 20 users + 100 posts12.9× 1.5× 1.7×
Update 100 users22.2× 1.8× 2.0×
Delete 100 posts15.0× 1.6× 1.7×

Memory

Peak memory of the process loading all 10 000 posts.

PDO baseline · 13.6 MiB
Cycle DataMapper36.7 MiB +23.2 MiB
Cycle ActiveRecord40.2 MiB +26.6 MiB
Doctrine ORM22.1 MiB +8.6 MiB
Eloquent21.9 MiB +8.3 MiB
Yii ActiveRecord18.7 MiB +5.2 MiB

How it is measured ​

  • Same data. 1000 users with 10 posts each. SQLite lives in memory; PostgreSQL and MySQL run as services next to the runner.
  • Same work. Before measuring, every ORM is checked against PDO: the same rows loaded, the same rows written, everything rolled back.
  • Isolated processes. Each ORM has its own Composer project, and PHPBench runs every iteration in a fresh process with OPcache on. The time shown is the mode of the iterations.
  • Fair baseline. PDO runs next to every ORM on the same runner; the baseline is the median of those runs, so one noisy run can't skew the ratios.
  • Writes leave no trace. Inserts, updates and deletes run in a transaction that is rolled back.
  • GitHub-hosted runners. Absolute times move between runner machines; compare ratios rather than microseconds across runs.

The scenarios, the entity mappings and the exact settings are in the repository. Spotted something unfair to one of the ORMs? Open an issue.