Skip to content

Speed up call frame leaving by grouping refcounted CVs - #23441

Draft
ndossche wants to merge 1 commit into
php:masterfrom
ndossche:sort-cv
Draft

Speed up call frame leaving by grouping refcounted CVs#23441
ndossche wants to merge 1 commit into
php:masterfrom
ndossche:sort-cv

Conversation

@ndossche

Copy link
Copy Markdown
Member

Leaving the call frame must destroy all the CVs.
It loops over all the vars and then uses i_zval_ptr_dtor on them. We can skip the non-refcounted CVs in bulk to speed up that loop.

Leaving the call frame must destroy all the CVs.
It loops over all the vars and then uses i_zval_ptr_dtor on them.
We can skip the non-refcounted CVs in bulk to speed up that loop.
@github-actions

Copy link
Copy Markdown

AWS x86_64 (c6id.metal)

Attribute Value
Environment aws
Instance type c6id.metal
Architecture x86_64
CPU Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz, 64 cores @ 2900 MHz
CPU settings disabled deeper C-states, disabled turbo boost, disabled hyper-threading
RAM 251 GB
Kernel 6.18.38-76.139.amzn2023.x86_64
OS Amazon Linux 2023.12.20260727
GCC 14.2.1
Time 2026-08-24 19:48:32 UTC
Job details https://github.com/php/php-src/actions/runs/32770249284 (Artifacts)
Changeset https://github.com/php/php-src/compare/c96900ee74..bf8433c825

Laravel 12.11.0 demo app - 50 iterations, 50 warmups, 100 requests (sec)

PHP Min Max Std dev Rel std dev % Mean Mean diff % Median Median diff % Skewness Z-stat P-value Memory
PHP - baseline@c96900e 0.36978 0.37158 0.00032 0.09% 0.37028 0.00% 0.37028 0.00% 1.213 0.000 1.000 25.67 MB
PHP - baseline@c96900e (JIT) 0.34850 0.34976 0.00028 0.08% 0.34908 -5.73% 0.34905 -5.73% 0.349 8.614 0.000 25.78 MB
PHP - sort-cv 0.36890 0.36989 0.00023 0.06% 0.36932 -0.26% 0.36933 -0.26% 0.485 8.552 0.000 25.87 MB

Symfony 2.8.0 demo app - 50 iterations, 50 warmups, 100 requests (sec)

PHP Min Max Std dev Rel std dev % Mean Mean diff % Median Median diff % Skewness Z-stat P-value Memory
PHP - baseline@c96900e 0.66739 0.67055 0.00053 0.08% 0.66812 0.00% 0.66800 0.00% 2.175 0.000 1.000 25.79 MB
PHP - baseline@c96900e (JIT) 0.63982 0.64129 0.00037 0.06% 0.64043 -4.14% 0.64032 -4.14% 0.915 8.614 0.000 26.30 MB
PHP - sort-cv 0.66552 0.67246 0.00113 0.17% 0.66631 -0.27% 0.66596 -0.31% 3.793 7.463 0.000 26.19 MB

Wordpress 6.9 main page - 50 iterations, 20 warmups, 20 requests (sec)

PHP Min Max Std dev Rel std dev % Mean Mean diff % Median Median diff % Skewness Z-stat P-value Memory
PHP - baseline@c96900e 0.58683 0.59033 0.00074 0.13% 0.58793 0.00% 0.58794 0.00% 0.844 0.000 1.000 26.35 MB
PHP - baseline@c96900e (JIT) 0.51509 0.51948 0.00088 0.17% 0.51631 -12.18% 0.51612 -12.22% 2.079 8.614 0.000 26.42 MB
PHP - sort-cv 0.58704 0.59341 0.00128 0.22% 0.58849 0.09% 0.58810 0.03% 1.979 -2.223 0.026 26.31 MB

bench.php - 50 iterations, 20 warmups, 2 requests (sec)

PHP Min Max Std dev Rel std dev % Mean Mean diff % Median Median diff % Skewness Z-stat P-value Memory
PHP - baseline@c96900e 0.45043 0.45332 0.00065 0.14% 0.45198 0.00% 0.45200 0.00% -0.269 0.000 1.000 26.35 MB
PHP - baseline@c96900e (JIT) 0.14408 0.14503 0.00017 0.12% 0.14454 -68.02% 0.14453 -68.03% -0.040 8.614 0.000 26.42 MB
PHP - sort-cv 0.45047 0.45409 0.00070 0.16% 0.45179 -0.04% 0.45171 -0.06% 0.717 1.854 0.064 26.31 MB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant