php-src/ext/libxml
Ilija Tovilo 2f5295692f
Optimize stripos/stristr
Closes GH-7847
Closes GH-7852

Previously stripos/stristr would lowercase both the haystack and the
needle to reuse strpos. The approach in this PR is similar to strpos.
memchr is highly optimized so we're using it to search for the first
character of the needle in the haystack. If we find it we compare the
remaining characters of the needle manually.

The new implementation seems to perform about half as well as strpos (as
two memchr calls are necessary to find the next candidate).
2022-01-31 21:44:31 +01:00
..
tests Deprecate implicit dynamic properties 2021-11-26 14:10:11 +01:00
config.w32 Control VCRT leak reporting via environment variable in debug builds 2020-06-10 09:05:17 +02:00
config0.m4 Normalize comments in *nix build system m4 files 2019-05-12 18:43:03 +02:00
CREDITS
libxml.c Optimize stripos/stristr 2022-01-31 21:44:31 +01:00
libxml.stub.php Add more specific array return type hints for various extensions - part 3 (#7467) 2021-09-06 12:27:28 +02:00
libxml_arginfo.h Add more specific array return type hints for various extensions - part 3 (#7467) 2021-09-06 12:27:28 +02:00
php_libxml.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_libxml2.def Add symbol to libxml exports 2017-09-11 17:35:25 +02:00