Performance
35× faster than the field-leading PHP data-object library — without changing how you write DTOs.
Benchmarked against the most popular full-featured data-object library in the PHP/Laravel ecosystem — identical DTO shapes and attributes, 20,000 iterations per scenario after a 2,000-iteration warmup, PHP 8.4. Absolute numbers vary with hardware; the ratios stay stable across runs.
35×
Hydration throughput
faster on a flat DTO
37×
Serialization throughput
faster on a flat DTO
50×
Peak memory, streaming 50k rows
less with lazyCollection()
Throughput
higher is better · each scenario scaled to its own leaderHydration — flat DTO35× faster
Simple Data Objects4.5M ops/s
Popular alternative130K ops/s
Hydration — nested DTO30× faster
Simple Data Objects2.2M ops/s
Popular alternative74K ops/s
Hydration — collection of 2036× faster
Simple Data Objects270K ops/s
Popular alternative7.5K ops/s
Serialization — flat DTO37× faster
Simple Data Objects7.4M ops/s
Popular alternative200K ops/s
Serialization — nested DTO34× faster
Simple Data Objects4.0M ops/s
Popular alternative117K ops/s
Peak memory — streaming 50,000 hydrated rows
lower is betterRows from a generator, consumed one by one.
lazyCollection()50× less memory
Simple Data Objects0.26 MB
Popular alternative13 MB
CPU time per operation follows the same ratios — less CPU burned per request means more headroom per server. The from()/toArray() hot paths execute compiled per-class closures, and lazyCollection() keeps peak memory flat on any dataset size.
The numbers
| Scenario | Simple Data Objects | Popular alternative | Advantage |
|---|---|---|---|
| Hydration — flat DTO | ~4,500,000 ops/s | ~130,000 ops/s | ~35× |
| Hydration — nested DTO | ~2,200,000 ops/s | ~74,000 ops/s | ~30× |
| Hydration — collection of 20 | ~270,000 ops/s | ~7,500 ops/s | ~36× |
| Serialization — flat DTO | ~7,400,000 ops/s | ~200,000 ops/s | ~37× |
| Serialization — nested DTO | ~4,000,000 ops/s | ~117,000 ops/s | ~34× |
| Peak memory — streaming 50,000 rows | 0.26 MB | ~13 MB | ~50× |