What are the principles behind PHP7's superior performance ?, The principle of PHP7 superior performance. What are the principles behind PHP7's superior performance ?, PHP7 principle of superior performance author: Han Tianfeng link: www. zhihu. comquestion38148900answer75115687 Source: What are the principles behind PHP7's superior performance ?, Principles of PHP7 superior performance
Author: Han Tianfeng
Link: http://www.zhihu.com/question/38148900/answer/75115687
Source: Zhihu
The operating principle of PHP7 is not changed compared with PHP5, which is different from hhvm. The general performance is optimized based on the perf performance analysis tool.
Reduce the number of memory allocations, use the stack memory, cache the array hash value, convert string parsing to macro expansion, and replace small memory with large continuous memory. For more details, see the PHP7 PPT of laruence. The performance of zend Engine programs has improved a lot, and the performance of PHP programs is naturally better. All the optimizations are very real, and the number of details is less than enough.
Trying to optimize a program with a history of 20 years is a very challenging task, and it is more difficult than re-engineering. 80% of the world's websites use PHP. after using PHP 7, these website programs will be able to get doubled performance free of charge. How much CPU will be saved, how much power will be saved, and how much carbon emissions will be reduced. In addition, PHP is an open-source project with no commercial company behind it and is fully operated by the community. Developers and enterprises using the PHP language have never paid a cent to the PHP official website. Therefore, it is recommended that you keep your mind safe, no matter how much you despise PHP, but please respect what others have done for the world.
Why ?, PHP7 performance principle of excellence author: Han Tianfeng link: http://www.zhihu.com/question/38148900/answer/75115687 Source: know almost PHP7 in the run of the original...