**一.PHP原生代码** ~~~ #index.php <?php $a=1; $b=2; $c=$a+$b; ?> ~~~ **二.获得JIT汇编后的机器码** ~~~ #/usr/local/php/bin/php /usr/local/php/bin/php -d opcache.jit=1205 -d opcache.jit_debug=0x01 index.php /usr/local/php/bin/php -d opcache.jit=function -d opcache.jit_debug=0x01 index.php JIT$simple: ; (/tmp/1.php) sub $0x10, %rsp xor %rdx, %rdx jmp .L2 .L1: add $0x1, %rdx ~~~ **三.JIT基准测试** ~~~ #Zend/bench.php #cp /mnt/php-8.0.0/Zend/bench.php /usr/local/nginx/html/bbs/ ~~~ 1.jit禁用 ~~~ /usr/local/php/bin/php -d opcache.jit_buffer_size=0 bench.php /usr/local/php/bin/php -d opcache.jit=disable bench.php ~~~ 2.jit开启 ~~~ /usr/local/php/bin/php -d opcache.jit_buffer_size=64M -d opcache.jit=1205 bench.php /usr/local/php/bin/php -d opcache.jit=tracing bench.php ~~~ **四.JIT计算压力测试** ~~~ #index.php <?php $a=1; $b=2; $c=$a+$b; ?> ~~~ ~~~ #win ab ab -n10 -c10 http://bbs.linux.com/index.php ab -n1000 -c1000 http://bbs.linux.com/index.php ab -n10000 -c10000 http://bbs.linux.com/index.php ~~~ **五.JIT WEB压力测试** ~~~ #index.php phpinfo(); ~~~ ~~~ #win ab ab -n10 -c10 http://bbs.linux.com/index.php ab -n1000 -c1000 http://bbs.linux.com/index.php ab -n10000 -c10000 http://bbs.linux.com/index.php ~~~ ###