note 112506 deleted from function.similar-text by tularis
| From: | tularis@php.net | Date: | Mon, 24 Jun 2013 20:48:51 +0000 |
| Subject: | note 112506 deleted from function.similar-text by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-195335@lists.php.net to get a copy of this message | ||
Note Submitter: nurbson at gmail dot com
----
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.