|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-06-13 17:44 UTC] marc at phpmyadmin dot net
Description:
------------
stripos() is very slow on Windows, about ten times slower than on Linux.
Reproduce code:
---------------
$a = str_repeat('x', 100000);
for ($i = 0; $i < 10000; $i++) {
$b = stripos($a, 'y');
}
Expected result:
----------------
On Linux it takes about 3 secondes.
Actual result:
--------------
On Windows: 30 seconds
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 17:00:01 2025 UTC |
It seems it's a php_strtolower() issue because we have the same problem by replacing stripos to strtolower... The problem occurs on Windows also with strtolower()... 71 seconds on Windows, 25s on linux... Reproduce code: $a = str_repeat('x', 100000); for ($i = 0; $i < 10000; $i++) { $b = strtolower($a); }