summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_utils.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-12-12 10:19:41 +0300
committerDmitry Stogov <dmitry@zend.com>2014-12-12 10:19:41 +0300
commit14e29f51460ecd1ec9ae7a26dfb9dcb2c81768d5 (patch)
tree98658f59f7973c3bcc538ddea39e3a4953fb325c /sapi/phpdbg/phpdbg_utils.c
parent9ea35a37b9425fc0dc392a754dac7e53791f5521 (diff)
downloadphp-git-14e29f51460ecd1ec9ae7a26dfb9dcb2c81768d5.tar.gz
Reduced size of zend_op on 64-bit systems.
the main idea - the smaller the zend_op structure, the lees memory traffic is required to load VM instructions during execution. The patch reduces the size of each opcode from 48 to 32 bytes (saves 16 bytes for each opcode, and applications use thousands of opoceds). This reduced the number of CPU cache misses by 12% and improved performance of real-life apps by 1-2%. The patch affects how constants and jump targets are represented in VM during execution. Previously they were implemented as absolute 64-bit pointers. Now they are relative 32-bit offsets. In run-time constant now should be accessed as: RT_CONSTANT(op_array, opine->op1) instead of opline->op1.zv EX_CONSTANT(opline->op1) instead of opline->op1.zv Jump targets: OP_JMP_ADDR(opline, opline->op2) instead of opline->op2.jmp_addr The patch doesn't change zend_op representation for 32-bit systems. They still use absolute addresses. The compile-time representation is also kept the same.
Diffstat (limited to 'sapi/phpdbg/phpdbg_utils.c')
0 files changed, 0 insertions, 0 deletions