Latest PHP Framework Benchmarks with Source Code

The crucial difference is that the spec needs to exercise all the features of a framework that a real application would use, such as caching, database, and templates (feels like I’ve said this before), and Hello World doesn’t come remotely close to doing that.

But as I mentioned in my last post, why not test those things independently? Compare the different database implementations and the different template systems as their own tests against each other rather than as the whole framework stack. You can then work out the relative performance of each possible combination by adding together the relative performance of Framework Hello World + database layer of your choice + Template system of your choice. If, as is likely, the database implementation is using 90% of the benchmark time you can make your choice based on that. Not only that, when using separated benchmarks you can see exactly which component is the slowest part.

There is little to no benefit of benchmarking the entire framework stack considering making it a fair test is incredibly difficult.

This tells us something very important. If you’re writing a simple hello world app, Don’t use a framework.

Frameworks that do more “out of the box” potentially have more overhead. That’s hardly a surprise tbh.

It’s only “Overhead” if you don’t use it. In a real world app, a lot of the features in Laravel are used. Therefore they are not overhead. And any which have too much overhead for you? Well switch those out with your own replacements.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.