note 112506 added to function.similar-text
| From: | nurbson at gmail dot com | Date: | Mon, 24 Jun 2013 10:58:52 +0000 |
| Subject: | note 112506 added to function.similar-text | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195333@lists.php.net to get a copy of this message | ||
To all those discussions about the speed problem of 'similar-text':
My suggestion is to not use it in productive environments since strings can get very long very
quickly (e.g. code versioning in TYPO3). The problem I see is, that the implementation of
'similar-text' is recursive and therefor it builds a huge callback-stack. This fails for
two reasons:
First building such a stack doesn't scale well (complexity of O(N**3) )
Secondly it simply crashes on long strings (mostly because of reason #1)
It would be much better to reimplement 'similar-text' iteratively.
----
Server IP: 69.147.83.199
Probable Submitter: 212.23.141.251
----
Manual Page -- http://php.net/manual/en/function.similar-text.php
Edit -- https://master.php.net/note/edit/112506
Del: integrated -- https://master.php.net/note/delete/112506/integrated
Del: useless -- https://master.php.net/note/delete/112506/useless
Del: bad code -- https://master.php.net/note/delete/112506/bad+code
Del: spam -- https://master.php.net/note/delete/112506/spam
Del: non-english -- https://master.php.net/note/delete/112506/non-english
Del: in docs -- https://master.php.net/note/delete/112506/in+docs
Del: other reasons-- https://master.php.net/note/delete/112506
Reject -- https://master.php.net/note/reject/112506
Search -- https://master.php.net/manage/user-notes.php