What are the principles behind PHP7's excellent performance? , PHP7 excellent performance principle_PHP tutorial

WBOY
Release: 2016-07-12 09:03:31
Original
716 people have browsed it

What are the principles behind the excellent performance of PHP7? , PHP7 Excellent Performance Principle

Author: Han Tianfeng
Link: http://www.zhihu.com/question/38148900/answer/75115687
Source: Zhihu

The operating principle of PHP7 has not changed compared with PHP5, which is different from hhvm. Mainly based on the perf performance analysis tool for general performance optimization.

Reduce the number of memory allocations, use more stack memory, cache array hash values, parse strings into parameters instead of macro expansion, use large contiguous memory instead of small memory, etc. For more detailed information, please see Brother Niao’s PHP7 sharing PPT. The performance of the zend engine program has been improved a lot, and the performance of the PHP program has naturally improved. All optimizations are very practical and start with details.

Finding ways to optimize a 20-year-old program is a very challenging task, and it is more difficult than tearing down and refactoring. 80% of websites in the world use PHP. After using PHP7, these website programs can get 1x performance improvement for free without much cost. How much CPU will be saved, how much electricity will be saved, and how much carbon emissions will be reduced. In addition, PHP is an open source project, there is no commercial company behind it, and it is completely run by the community. Developers and companies using the PHP language have never paid a penny to PHP officials. Therefore, I suggest that all friends keep their moral integrity in mind. No matter how much you despise PHP, please respect what others have done for the world. ​

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1080767.htmlTechArticleWhat are the principles behind the excellent performance of PHP7? , PHP7 excellent performance principle Author: Han Tianfeng Link: http://www.zhihu.com/question/38148900/answer/75115687 Source: Zhihu PHP7 is running the original...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template