Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Actually the code does generate all the LCS's. I used to print those out. If you are interested you can add back the line by copying the print for best match, pasting it after the line $localBest = expandMatch (@$localBest); and replacing $bestMatch with $localBest. The run time remains about the same :). I noticed the anomolies, but was so excited by the run rate that I sort of forgot about them and posted the code. The problem will be in the expandMatch sub which does a binary search to extend the match at each end to the full extent of the matched run. It's probably trivial to fix and I'll have a look and update the posted code when I find the bug. The minimum match length is where the "blazingly fast" bit comes from. Although it still seems to be pretty fast even for small match lengths. This turned out so much faster than anything else that I couldn't quite believe it! I'm pleased that you have reproduced my results (bugs included). Perl is Huffman encoded by design. In reply to Re^3: Search for identical substrings
by GrandFather
|
|