PHP7新特性的总结
Release: 2016-06-20 12:40:53
Original
817 people have browsed it
总结
HHVM : new php engine 70% high performance
为JIT做准备,增加类型限定
错误异常的重构 :try / catch
优化:zval使用栈内存。在zend引擎和扩展中,要创建php的一个变量,底层就是一个zval指针。之前的版本通过MAKE_STD_ZVAL动态的从堆上分配一个zval内存。php7可以直接使用栈内存。
创建新类型zend_string,增加hash字段,保存字符串的hash值。数组键值查找不需要反复计算hash值。
hashtable桶内直接存数据,减少了内存申请次数,提升了cache命中率和内存访问速度
zend_parse_parameters改为宏实现
新增四种opcode: call_user_function, is_int/string/array, strlen, defined
基础类型改为值拷贝
排序算法的改进
PCRE with JIT,execute_data, opline: 正则表达式可以编译为机器码
gdb4.8的PGO功能
参考
某年某月的某期刊
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
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31