Bug #74929 [Fbk->Csd]: mbstring functions version 7.1.1 are slow compared to 5.3 on Windows
| From: | ab@php.net | Date: | Wed, 26 Jul 2017 12:54:20 +0000 |
| Subject: | Bug #74929 [Fbk->Csd]: mbstring functions version 7.1.1 are slow compared to 5.3 on Windows | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210355@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74929&edit=1
ID: 74929
Updated by: ab@php.net
Reported by: andxfiles at gmail dot com
Summary: mbstring functions version 7.1.1 are slow compared
to 5.3 on Windows
-Status: Feedback
+Status: Closed
Type: Bug
Package: mbstring related
Operating System: Windows
PHP Version: 7.1.7
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Closing, as it is going to be first available in 7.3.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-07-26 11:32:40] ab@php.net
Nikita, please mention this ticket, once the perf part is merged into 7.2.
Thanks.
------------------------------------------------------------------------
[2017-07-24 22:38:31] andxfiles at gmail dot com
I apologize, had not scrolled down, thought that the latest was 7.1.9.
I just downloaded and tested the master branch (7.3.0-dev) and it is indeed way faster, as your
results show ab@php.net
5.3.28:
mb_strlen: 153.6 milliseconds
mb_stripos: 1814.6 milliseconds
mb_substr: 163.1 milliseconds
7.1.1
mb_strlen: 289 milliseconds
mb_stripos: 3247.3 milliseconds
mb_substr: 295.7 milliseconds
7.3 (master)
mb_strlen: 33.7 milliseconds
mb_stripos: 139.6 milliseconds
mb_substr: 41.8 milliseconds
you can mark the bug as solved. Thank you. Would be grateful if it was included on 7.2
------------------------------------------------------------------------
[2017-07-24 10:30:06] ab@php.net
Thanks for checking. I've tested your snippet now, but the results are somewhat different.
5.3 x86
mb_strlen: 327.4 milliseconds
mb_stripos: 3125.6 milliseconds
mb_substr: 260.6 milliseconds
5.6 x86
mb_strlen: 293 milliseconds
mb_stripos: 3145.3 milliseconds
mb_substr: 342.4 milliseconds
7.1 x86
mb_strlen: 432 milliseconds
mb_stripos: 5672.8 milliseconds
mb_substr: 567.7 milliseconds
master x86
mb_strlen: 73.6 milliseconds
mb_stripos: 248.5 milliseconds
mb_substr: 69.6 milliseconds
master x64
mb_strlen: 91.6 milliseconds
mb_stripos: 312.6 milliseconds
mb_substr: 101.6 milliseconds
To see is, that indeed some slowdown made it into PHP 7. The current master however is significant
faster that any previous branch, even on 64 bit. Please note, that 7.1 is not master. You need to
fetch literally master snapshots from the page linked, the improvements are not anywhere else ATM.
Thanks.
------------------------------------------------------------------------
[2017-07-24 06:53:21] andxfiles at gmail dot com
ab@php.net, nikic@php.net:
Unfortunately under Windows I still see no difference. New results:
5.3.28:
mb_strlen: 309.4 milliseconds
mb_stripos: 3523.4 milliseconds
mb_substr: 326.6 milliseconds
7.1.1:
mb_strlen: 426.3 milliseconds
mb_stripos: 4812.5 milliseconds
mb_substr: 421.9 milliseconds
7.1.9-dev (master)
mb_strlen: 421.9 milliseconds
mb_stripos: 4890.6 milliseconds
mb_substr: 421.9 milliseconds
------------------------------------------------------------------------
[2017-07-23 19:15:31] ab@php.net
@andxfiles, Nikita made quite a few improvements to ext mbstring in master, see bug #74933. I'd
say, it would make sense to check some latest master snapshot, to fetch here http://windows.php.net/snapshots/ . We also work on a
new PGO approach, so further improvements are to come.
Thanks.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74929
--
Edit this bug report at https://bugs.php.net/bug.php?id=74929&edit=1