mirror of
https://github.com/php/php-src.git
synced 2024-09-25 20:07:26 +00:00
ca15b22212
(single-character break, no forced break) appears to be about 60% faster, and there's simply no comparison for non-simple cases with non-trivial amounts of text. The old algorithm was O(n^2) (with an unfortunately large constant factor) because of the use of strncat(), the new one is O(n). Added some more tests, too. @ - Made wordwrap() significantly faster. (Jim) # test case: $t = join('',file('ChangeLog')); $w = wordwrap($t,10,"\n",1); # new code completes in less than a second. i'm still waiting for the # old code to finish. |
||
---|---|---|
.. | ||
array | ||
assert | ||
file | ||
general_functions | ||
math | ||
reg | ||
serialize | ||
strings | ||
time | ||
versioning |