You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

2
3
3
-
This project attempts to measure minimum overhead (minimum bootstrap cost) of PHP frameworks in the real world.
4
+
This project attempts to measure the minimum overhead (minimum bootstrap cost) of PHP frameworks in the real world.
4
5
5
-
So I think the minimum applications to benchmark should not include:
6
+
So I think the minimum should not include:
6
7
7
8
* cost of template engine (HTML output)
8
9
* cost of database manipulation
9
10
* cost of debugging information
10
11
11
-
Components like Template engine or ORM/Database libraries are out of scope in this project.
12
+
Components like Template engines or ORM/Database libraries are out of scope in this project.
13
+
14
+
15
+
-[PHP Frameworks Bench](#php-frameworks-bench)
16
+
-[Benchmarking Policy](#benchmarking-policy)
17
+
-[How to Benchmark](#how-to-benchmark)
18
+
-[Commands](#commands)
19
+
-[Benchmarks](#benchmarks)
20
+
-[Latest](#latest)
21
+
-[Old](#old)
22
+
-[OPCache](#results-with-opcache)
23
+
-[References](#references)
24
+
-[License](#license)
25
+
26
+
12
27
13
28
## Benchmarking Policy
14
29
@@ -19,33 +34,116 @@ This is `master` branch.
19
34
* Don't remove any components/configurations even if they are not used.
20
35
* With minimum changes to run this benchmark.
21
36
* Set environment production/Turn off debug mode.
22
-
* Run optimization which you normally do in your production environment, like Composer's `--optimize-autoloader`.
23
-
* Use controller or action class if a framework has the functionality.
37
+
* Run the general optimization in your production environment, like `--optimize-autoloader` for the composer.
38
+
* Use controller or action class.
24
39
25
-
Some people may think using default configuration is not fair. But I think a framework's default configuration is an assertion of what it is. Default configuration is a good starting point to know a framework. And I can't optimize all the frameworks. Some frameworks are optimized, some are not, it is not fair. So I don't remove any components/configurations.
40
+
Some frameworks are optimized, some are not, so some people may think using default configuration is not fair. The dept of optimizing a framework depends on the developer's knowledge & experienced, it's the rabbit hole and there is no point in that for benchmarking. I think the default configuration of frameworks is a good starting point to have the ranking points.
26
41
27
-
If you find something wrong with my code, please feel free to send Pull Requests. But please note optimizing only for "Hello World" is not acceptable! Building fastest "Hello World" application is not the goal in this project.
42
+
If you find something wrong with my code, please feel free to send Pull Requests. But please note optimizing for the "Hello World" is not acceptable! Building the fastest "Hello World" application is not the goal of this project.
28
43
29
-
## Results
30
44
31
-
### Benchmarking Environment
45
+
##How to Benchmark
32
46
33
-
* Windows 10 64bit (bash executed on WSL 2)
34
-
* PHP 8.0 (XAMPP x64)
47
+
If you want to benchmark PHP extension frameworks like Phalcon, you need to install the extenstions.
48
+
49
+
1- Install source code as <http://localhost/php-frameworks-bench/>:
@@ -66,67 +164,13 @@ These are my benchmarks, not yours. **I encourage you to run on your (production
66
164
|laravel-8.6.6 | 39.96| 40.0| 11.90| 11.9|
67
165
68
166
69
-
### Hello World Benchmark with OPCache
167
+
### Results with OPCache
70
168
[](http://www.youtube.com/watch?v=BUcxalvD92U"PHP OPCache Benchmarks, a Comparison for Popular Frameworks")
71
169
72
170
73
-
## How to Benchmark
74
-
75
-
If you want to benchmark PHP extension frameworks like Phalcon, you need to install the extenstions.
76
-
77
-
Install source code as <http://localhost/php-frameworks-bench/>:
If you want to see current configuration, run `sudo sysctl -a`.
117
-
118
-
## Apache Virtual Host Configuration
119
-
120
-
~~~
121
-
<VirtualHost *:80>
122
-
DocumentRoot /home/vagrant/public
123
-
</VirtualHost>
124
-
~~~
125
-
126
-
127
171
## References
128
172
Note: This project is based on
129
-
[php-framework-benchmark](https://github.com/kenjis/php-framework-benchmark). It was very old and no longer maintained, so I decided to split it from the origin repo and update it separately.
173
+
[php-framework-benchmark](https://github.com/kenjis/php-framework-benchmark). It was very old and abandoned, so I decided to split it from the origin and update it separately.
0 commit comments