Skip to content

Fix GH-11997: ctype_alnum 5 times slower in PHP 8.1 or greater - #12300

Closed
ndossche wants to merge 1 commit into
php:PHP-8.1from
ndossche:ctype-regr-1
Closed

ndossche wants to merge 1 commit into
php:PHP-8.1from
ndossche:ctype-regr-1

Conversation

@ndossche

Copy link
Copy Markdown
Member

Currently, a common function is used where a function pointer gets passed to check the character class type. If we instead use a macro, the macro version of these character class type checkers can be used. While this gives only a minor speed-up for glibc-based systems, on Alpine this gives a multi-facor speed-up

This is essentially a manual revert of dc80ea7.

Full discussion in GH-11997.

Currently, a common function is used where a function pointer gets
passed to check the character class type. If we instead use a macro, the
macro version of these character class type checkers can be used. While
this gives only a minor speed-up for glibc-based systems, on Alpine this
gives a multi-facor speed-up

This is essentially a manual revert of dc80ea7.

Full discussion in phpGH-11997.
@ndossche ndossche linked an issue Sep 25, 2023 that may be closed by this pull request
@ndossche ndossche closed this in 07811b6 Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ctype_alnum 5 times slower in PHP 8.1 or greater

2 participants