php 5.4 性能优化,PHP5.4新特性及性能优化.pdf

PHP 5.4 Performance

Thanks to Dmitry Stogov

Laruence

@laruence

/

PHP

• 1995

• 77.3%

• 5.4

• 4x

PHP Performance Evaluation

bench.php

PHP 5.0 13

PHP 5.1 6.5

PHP 5.2 5.6

PHP 5.3 3.9

PHP 5.4 3.3

0 2 4 6 8 10 12 14

sec

PHP Performance Evaluation

micro_bench.php

PHP 5.0 57.44

PHP 5.1 31.86

PHP 5.2 28.55

PHP 5.3 22.66

PHP 5.4 12.67

0 10 20 30 40 50 60 70

sec

New freatures

• Traits

• Built-in web server

• Array de-referencing

• Class member access on instantiation

• Shortened array syntax

• Binary number format

• …

• 我们今天只讲5.3到5.4的优化

Delayed Hashtable Allocation

• 很多的HashTable都是空的

• 类的静态属性表, 常量表, 函数表

• 用户定义的空数组

• 推迟对HashTable的Buckets的内存分配, 直到第一个元素被插入

Literal Tables

• 每一条V

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值