You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor some ext/pcre code for performance (#12447)
* Always inline populate_match_value and fix argument type
The call overhead of this function is quite large.
* Use _new variant of zend_hash in some places to avoid additional check
* Move allocation of match_sets down to simplify and reduce code size
* Move pcre2_get_ovector_pointer out of the loop
This is allocated together with the match data and stays loop invariant:
the pointer is always the same (the values not however).
* Mark error condition as cold block
* Simplify condition: subpats is already checked
* Move array size preallocation to use allocate the up-to-date size
* Simplify condition
* Rework internal functions to avoid repeated unwrapping
* Remember Z_ARRVAL_P(return_value)
The lookup is loop invariant.
* Mark some pointers as const
0 commit comments