1
0
mirror of https://github.com/php/php-src.git synced 2026-04-08 00:22:52 +02:00
Files
archived-php-src/Zend/Optimizer
Niels Dossche 6a6e91f3c7 Shrink some commonly used structs by reordering members (#10880)
Struct members require some alignment based on their type. This means
that if a struct member is not aligned, there will be a hole created by
the compiler in the struct, which is wasted space. This patch reorders
some of the most commonly used structs, but in such a way that the
fields which were in the same cache line still belong together.
The only exception to this is exception_ignore_args, which was
temporally not close to nearby members, and as such I placed
it further up to close a hole.

On 64-bit Linux this gives us the following shrinks:
* zend_op_array: 248 -> 240
* zend_ssa_var: 56 -> 48
* zend_ssa_var_info: 48 -> 40
* php_core_globals: 672 -> 608
* zend_executor_globals: 1824 -> 1792

On 32-bit, the sizes will either remain the same or will result in
smaller shrinks.
2023-03-22 19:26:42 +01:00
..
2023-03-10 19:31:19 +01:00
2023-01-16 12:25:59 +01:00
2023-01-16 12:25:59 +01:00
2023-01-16 12:25:59 +01:00
2023-03-13 10:00:28 +01:00
2023-01-16 12:25:59 +01:00
2023-01-16 12:25:59 +01:00