Re: [PHP-DEV] mb_check_encoding slow performance?

2021-08-25 Thread Nikita Popov
On Mon, Aug 16, 2021 at 10:56 AM Alex wrote: > Dear Nikita, > > It looks like we think alike. > > I already have a local dev branch on my PC with the beginnings of the > internal interface change which you describe here. In some cases which I > tested, it makes mbstring encoding conversion operat

Re: [PHP-DEV] mb_check_encoding slow performance?

2021-08-16 Thread Nikita Popov
On Mon, Aug 9, 2021 at 10:14 PM Rowan Tommins wrote: > On 07/08/2021 18:57, Hans Henrik Bergan wrote: > > can someone shed some light on this? why does mb_check_encoding seem to > be > > so much slower than the alternatives? > > benchmark code+results is here > https://stackoverflow.com/a/6869075

Re: [PHP-DEV] mb_check_encoding slow performance?

2021-08-09 Thread Rowan Tommins
On 07/08/2021 18:57, Hans Henrik Bergan wrote: can someone shed some light on this? why does mb_check_encoding seem to be so much slower than the alternatives? benchmark code+results is here https://stackoverflow.com/a/68690757/1067003 Hi Hans, Since you ran the test on PHP 7.4, the relevant

[PHP-DEV] mb_check_encoding slow performance?

2021-08-07 Thread Hans Henrik Bergan
not sure if this message belongs on php-gene...@lists.php.net or internals@lists.php.net or elsewhere, i'll just try here first and see what happens, recently made some tests to check performance of UTF8 validators, and in that (simple non-comprehensive) test, preg_match() is ~33 times faster than