Yii is a high-performance framework. The following chart shows the high efficiency of Yii compared with other popular PHP frameworks. In this chart, RPS stands for "Requests Per Second" and describes how many requests this framework performs per second.
The larger this number, the higher the performance of this framework, and we can see that Yii outperforms other frameworks in this comparison. (Recommended learning:yii framework)
Why Yii is so fast
Yii is so It's fast because it makes extensive use of lazy loading techniques. For example, the class will not be included until it is used for the first time; the object will not be created until the object is accessed for the first time.
Benchmark Request
Since our goal is to compare the minimal overhead of each framework, the benchmark application for each framework should be the simplest. We chose to display the "Hello World" text string by placing an echo statement in each application's default action.
Disable any other framework features (such as sessions) to ensure a fair comparison. To get a copy of the benchmark application, check out the phpmark project.
The above is the detailed content of Why is yii fast?. For more information, please follow other related articles on the PHP Chinese website!