What are the principles behind PHP7 's superior performance?

Source: Internet
Author: User
Tags php language
Hantian
Links: http://www.zhihu.com/question/38148900/answer/75115687
Source: Know

PHP7 does not change in principle compared with PHP5, which is different from HHVM. It is mainly based on the Perf Performance analysis tool for general performance optimization.

Reduce memory allocations, use stack memory, cache array hash values, parse strings into macro expansion, use chunks of contiguous memory instead of small chunks of memory, and more. For more details, please see the PHP7 share ppt of brother Bird. Zend Engine program performance improved a lot, PHP program performance is naturally good. All of the optimizations are very real, starting with the details.

Finding a way to optimize a 20-year-old program is a very challenging thing to do, and it is more difficult than refactoring. There are 80% of the world's web sites with PHP, the use of PHP7 after these web site programs are not too expensive to get 1 time times the performance increase free. How much CPU will be saved, how much electricity is saved, and how much carbon emissions are reduced. In addition, PHP is an open source project, with no commercial company behind it, and is entirely community-run. Developers and businesses using the PHP language never paid a penny to PHP's official. So it is recommended that you know your friends mouth to stay, no matter how much you despise PHP, but please respect others for the world to pay.

What are the principles behind PHP7 's superior performance?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.