logo

Benchmarks: PHP Frameworks Compared

How fast are top 3 most popular PHP frameworks (Laravel, Symfony, CodeIgniter) when compared to Lucinda? To measure this, a series of ApacheBench stress tests weighting basic MVC performance was conducted on all my machines using an open methodology.

Benchmark Methodology

The main point was to make all benchmarks fair. Each framework was installed as a separate project using default factory settings on same machine, same web server using similar virtual host settings (if possible). Another point was to make all benchmarks independently reproductible. Developers are encouraged to reproduce benchmarks on their own machine by following methodology page!

Subject of testing is MVC performance of each framework (their kernels: routing, controlling, templating) on following simple scenarios:

Each framework was installed as a separate project, bound to a local domain named by FRAMEWORK itself (eg: laravel project => www.laravel.local), then configured to do above tasks. Once done, each configuration was benchmarked using following commands:

ab -n 100000 -c10 http://www.FRAMEWORK.local/test/html ab -n 100000 -c10 http://www.FRAMEWORK.local/test/json

Configuration of machine results below were obtained on:

Benchmark Results

Following raw results were obtained by ApacheBench commands above:

Format Lucinda Framework
3.2.0
Symfony Framework
5.2.99
CodeIgniter Framework
4.1.1
Laravel Framework
8.5.16
html
json

They show Lucinda to be incomparably faster than all others (thanks to its efficient design) by any metric:

To see detailed breakdown for each framework tested (other than Lucinda), check these pages:

Requests per Second

The most common metric, used by other benchmarks as well, is based on requests-per-second: measuring average number of requests framework can answer in 1 second. Results based on raw data collected above:

Rendering Lucinda Framework
3.2.0
Symfony Framework
5.2.99
CodeIgniter Framework
4.1.1
Laravel Framework
8.5.16
HTML 12510.76 3175.6 1419.98 346.78
JSON 13830.21 3499.42 1389.03 153.22

This means that Lucinda is over 3.9 times faster than Symfony, 8.8 times faster than CodeIgniter and 36.1 times faster than Laravel in rendering templated HTML.

Response Time (ms) by Percentile

For those unfamiliar with ApacheBench tests, it measures time response was received by percentile of requests. Results based on raw data collected above:

% Lucinda Framework
3.2.0
Symfony Framework
5.2.99
CodeIgniter Framework
4.1.1
Laravel Framework
8.5.16
HTML RENDERING BENCHMARK (ms)
50 1 3 6 11
66 1 3 6 14
75 1 4 7 17
80 1 4 9 19
90 1 5 11 22
95 1 5 12 29
98 1 7 16 47
99 1 8 17 768
100 13 26 44 1986
JSON RENDERING BENCHMARK (ms)
50 1 2 6 11
66 1 3 6 13
75 1 3 7 16
80 1 4 9 19
90 1 4 11 22
95 1 5 13 30
98 1 6 17 1337
99 1 7 18 2547
100 19 23 54 3973

This means, for example, that Lucinda is over 7 times more efficient than Symfony, 16 times more efficient than CodeIgniter and 47 times more efficient than Laravel in answering 98% of templated HTML requests.

×