Each framework has its own advantages and disadvantages. Laravel is relatively bloated, but it integrates many functions, such as the complete Artisan command line, ORM model, observer, listener, easy-to-use di container to implement dependency injection, etc. There are also many ecological extensions.
For tp, I only used the tp3.2 version at the earliest, and later I only had some understanding of tp5. Recently I discovered that tp6 has been released, and it is more similar to laravel. It has also developed the think command line and ORM model, and even the usage of ORM is similar. Didn't look at the others in detail.
Because I have always known that the disadvantage of laravel is that its performance is slower because it loads more things, so how much slower is it? Here is a simple test to see.
The three frameworks for comparison are:
laravel
tp
lumen
100,000 pieces of data have been inserted into the database in advance. Take a look at the performance comparison of the top ten items.
laravel7
Let’s take a look at the running results of the laravel framework.
lumen
Let’s take a look at lumen. As a lightweight laravel, lumen has deleted many functions. It is indeed much faster. Because Lumen removes the ORM by default, you need to uncomment the ORM in the bootstrap/app.php startup file.$app->withEloquent();
tp6
tp6 test results.laravel video tutorial, thinkphp framework】
The above is the detailed content of A brief analysis of the performance comparison of laravel, lumen and tp frameworks. For more information, please follow other related articles on the PHP Chinese website!