<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: More on masak&#8217;s p5</title>
	<atom:link href="http://justrakudoit.wordpress.com/2011/03/09/more-on-masaks-p5/feed/" rel="self" type="application/rss+xml" />
	<link>http://justrakudoit.wordpress.com/2011/03/09/more-on-masaks-p5/</link>
	<description>I Never Metaop I Didn&#039;t Like</description>
	<lastBuildDate>Thu, 07 Mar 2013 12:58:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Aaron Sherman</title>
		<link>http://justrakudoit.wordpress.com/2011/03/09/more-on-masaks-p5/#comment-2584</link>
		<dc:creator><![CDATA[Aaron Sherman]]></dc:creator>
		<pubDate>Thu, 17 Mar 2011 06:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=317#comment-2584</guid>
		<description><![CDATA[Since I fixed a small bug (code uploaded here  https://github.com/ajs/perl6-scripts ) I&#039;m no longer beating colomon. However, I am still producing very reasonable times, and beating most of the other contenders for most of the inputs. My worst performance is on inputs that have low numbers of symbols (e.g. the genetics examples), and I shine best on English text.]]></description>
		<content:encoded><![CDATA[<p>Since I fixed a small bug (code uploaded here  <a href="https://github.com/ajs/perl6-scripts" rel="nofollow">https://github.com/ajs/perl6-scripts</a> ) I&#8217;m no longer beating colomon. However, I am still producing very reasonable times, and beating most of the other contenders for most of the inputs. My worst performance is on inputs that have low numbers of symbols (e.g. the genetics examples), and I shine best on English text.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Berends</title>
		<link>http://justrakudoit.wordpress.com/2011/03/09/more-on-masaks-p5/#comment-2583</link>
		<dc:creator><![CDATA[Martin Berends]]></dc:creator>
		<pubDate>Thu, 17 Mar 2011 05:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=317#comment-2583</guid>
		<description><![CDATA[Aaron, this is p5-mberends.pl: http://pastebin.com/rK4tz0UE with the disclaimer that it is not being developed to be competitive and is hobbled by poor chr(0) handling in regexes and strings. It would be a helpful yak shave to remove the workarounds (after eliminating the need for them) and then compare performance. I made a Perl 5 version without workarounds and it runs much faster, but that may just be Perl 5.]]></description>
		<content:encoded><![CDATA[<p>Aaron, this is p5-mberends.pl: <a href="http://pastebin.com/rK4tz0UE" rel="nofollow">http://pastebin.com/rK4tz0UE</a> with the disclaimer that it is not being developed to be competitive and is hobbled by poor chr(0) handling in regexes and strings. It would be a helpful yak shave to remove the workarounds (after eliminating the need for them) and then compare performance. I made a Perl 5 version without workarounds and it runs much faster, but that may just be Perl 5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Sherman</title>
		<link>http://justrakudoit.wordpress.com/2011/03/09/more-on-masaks-p5/#comment-2582</link>
		<dc:creator><![CDATA[Aaron Sherman]]></dc:creator>
		<pubDate>Wed, 16 Mar 2011 23:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=317#comment-2582</guid>
		<description><![CDATA[So, it looks like my solution doesn&#039;t beat colomon&#039;s for all inputs (it does on the very long English text given above), but it does beat everyone else, and it&#039;s radically simpler than colomon&#039;s solution. I&#039;ll post it when I have a chance, but the algorithm is pretty trivial I just keep two lists: known solutions and &quot;active&quot; solutions. An active solution is any sub-string that I&#039;ve encountered in both source strings, but which might only be the root of a longer solution. I walk forward from 0 to whichever string length is larger (i, below) and do 8 things (there&#039;s a lot of bounds checking in my code that I&#039;m ignoring, below):

0) Store the current position, i, in both strings as an &quot;active solution&quot; of length 0 (an active solution is a datastructure containing an offset in string1, an offset in string2 and a current length).

1) check to see if string1[i] eq string2[x] where x is set to the last tested string2 position in each active solution plus one, if so increment its length by 1.

2) Same as above, but testing string2[i] against active solutions

3) At this point, all active solutions not matched in steps 1 or 2, above are removed from the list of active solutions and added to known solutions.

4) For all positions in string2 which are saved in the lookup table (see below) under string1[i], store a new, active solution of length 1.

5) Same as #4, but reversing string1/string2.

6) Append the index i to the list at lookup1[string1[i]]

7) as #6, but save to lookup2[string2[i]]

Once done with the outer loop, return the longest known solution.

Practical concerns include the fact that this approach could be memory intensive for very large strings.]]></description>
		<content:encoded><![CDATA[<p>So, it looks like my solution doesn&#8217;t beat colomon&#8217;s for all inputs (it does on the very long English text given above), but it does beat everyone else, and it&#8217;s radically simpler than colomon&#8217;s solution. I&#8217;ll post it when I have a chance, but the algorithm is pretty trivial I just keep two lists: known solutions and &#8220;active&#8221; solutions. An active solution is any sub-string that I&#8217;ve encountered in both source strings, but which might only be the root of a longer solution. I walk forward from 0 to whichever string length is larger (i, below) and do 8 things (there&#8217;s a lot of bounds checking in my code that I&#8217;m ignoring, below):</p>
<p>0) Store the current position, i, in both strings as an &#8220;active solution&#8221; of length 0 (an active solution is a datastructure containing an offset in string1, an offset in string2 and a current length).</p>
<p>1) check to see if string1[i] eq string2[x] where x is set to the last tested string2 position in each active solution plus one, if so increment its length by 1.</p>
<p>2) Same as above, but testing string2[i] against active solutions</p>
<p>3) At this point, all active solutions not matched in steps 1 or 2, above are removed from the list of active solutions and added to known solutions.</p>
<p>4) For all positions in string2 which are saved in the lookup table (see below) under string1[i], store a new, active solution of length 1.</p>
<p>5) Same as #4, but reversing string1/string2.</p>
<p>6) Append the index i to the list at lookup1[string1[i]]</p>
<p>7) as #6, but save to lookup2[string2[i]]</p>
<p>Once done with the outer loop, return the longest known solution.</p>
<p>Practical concerns include the fact that this approach could be memory intensive for very large strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Sherman</title>
		<link>http://justrakudoit.wordpress.com/2011/03/09/more-on-masaks-p5/#comment-2581</link>
		<dc:creator><![CDATA[Aaron Sherman]]></dc:creator>
		<pubDate>Wed, 16 Mar 2011 22:38:31 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=317#comment-2581</guid>
		<description><![CDATA[It would be nice if you could link to mberends solution. I&#039;ve got one myself that seems to perform better than any of your examples under certain circumstances, but it&#039;s impossible to tell without running my own trials...]]></description>
		<content:encoded><![CDATA[<p>It would be nice if you could link to mberends solution. I&#8217;ve got one myself that seems to perform better than any of your examples under certain circumstances, but it&#8217;s impossible to tell without running my own trials&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
