Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: Search for identical substringsby BrowserUk (Patriarch) |
on Aug 19, 2005 at 00:54 UTC ( [id://484995]=note: print w/replies, xml ) | Need Help?? |
The problem is that the "LCS" in Algorithm::Diff is Longest Common Sub-Sequence, but for your requirements you need Longest Common String. The difference being the latter is contiguous, whilst the former is not (need not be). You're after this?
I'm still verifying my algorithm is correct, but so far it appears to be about 10x quicker than the XS version of LCSS despite being pure perl. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
In Section
Seekers of Perl Wisdom
|
|