<?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/"
		>
<channel>
	<title>Comments on: Prime numbers in Common Lisp</title>
	<atom:link href="http://www.chipstips.com/?feed=rss2&#038;p=414" rel="self" type="application/rss+xml" />
	<link>http://www.chipstips.com/?p=414</link>
	<description>Contains coding, but not narcotic.</description>
	<lastBuildDate>Mon, 06 Sep 2010 16:01:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Sterling Camden</title>
		<link>http://www.chipstips.com/?p=414&#038;cpage=1#comment-105325</link>
		<dc:creator>Sterling Camden</dc:creator>
		<pubDate>Wed, 19 May 2010 17:48:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=414#comment-105325</guid>
		<description>Thanks, Bruce.  I probably could have figured out a way to make gcf and lcd share common code and pass in a function that differentiates their behavior.</description>
		<content:encoded><![CDATA[<p>Thanks, Bruce.  I probably could have figured out a way to make gcf and lcd share common code and pass in a function that differentiates their behavior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://www.chipstips.com/?p=414&#038;cpage=1#comment-105287</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Wed, 19 May 2010 08:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=414#comment-105287</guid>
		<description>Your examples are most instructive.  I particularly like the elegance of your gcf algorithm.</description>
		<content:encoded><![CDATA[<p>Your examples are most instructive.  I particularly like the elegance of your gcf algorithm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sterling Camden</title>
		<link>http://www.chipstips.com/?p=414&#038;cpage=1#comment-91064</link>
		<dc:creator>Sterling Camden</dc:creator>
		<pubDate>Sat, 24 Oct 2009 17:36:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=414#comment-91064</guid>
		<description>Your examples are most instructive.  I particularly like the elegance of your gcf algorithm.</description>
		<content:encoded><![CDATA[<p>Your examples are most instructive.  I particularly like the elegance of your gcf algorithm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sterling Camden</title>
		<link>http://www.chipstips.com/?p=414&#038;cpage=1#comment-90869</link>
		<dc:creator>Sterling Camden</dc:creator>
		<pubDate>Fri, 23 Oct 2009 16:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=414#comment-90869</guid>
		<description>Thanks, todavies.  I&#039;ll have to fully digest your algorithm when I get some more free time.</description>
		<content:encoded><![CDATA[<p>Thanks, todavies.  I&#8217;ll have to fully digest your algorithm when I get some more free time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todavies</title>
		<link>http://www.chipstips.com/?p=414&#038;cpage=1#comment-90686</link>
		<dc:creator>todavies</dc:creator>
		<pubDate>Thu, 22 Oct 2009 03:10:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=414#comment-90686</guid>
		<description>Oops, i misread your numbers - it says 10000 not 100000... 

(time (nth-prime 10000))
Evaluation took:
  0.075 seconds of real time
  0.048003 seconds of total run time (0.048003 user, 0.000000 system)

I&#039;m running your version (wrapped in a package) on the same system - 

(time (prime::nth-prime 10000))
Evaluation took:
  1.308 seconds of real time
  1.188074 seconds of total run time (1.152072 user, 0.036002 system)

(time (prime::nth-prime 100000))
Evaluation took:
  200.507 seconds of real time
  135.396462 seconds of total run time (120.423526 user, 14.972936 system)

Conclusion - vectors are your friends...

http://www.cs.mu.oz.au/~todavies/primes.lisp for the source</description>
		<content:encoded><![CDATA[<p>Oops, i misread your numbers &#8211; it says 10000 not 100000&#8230; </p>
<p>(time (nth-prime 10000))<br />
Evaluation took:<br />
  0.075 seconds of real time<br />
  0.048003 seconds of total run time (0.048003 user, 0.000000 system)</p>
<p>I&#8217;m running your version (wrapped in a package) on the same system &#8211; </p>
<p>(time (prime::nth-prime 10000))<br />
Evaluation took:<br />
  1.308 seconds of real time<br />
  1.188074 seconds of total run time (1.152072 user, 0.036002 system)</p>
<p>(time (prime::nth-prime 100000))<br />
Evaluation took:<br />
  200.507 seconds of real time<br />
  135.396462 seconds of total run time (120.423526 user, 14.972936 system)</p>
<p>Conclusion &#8211; vectors are your friends&#8230;</p>
<p><a href="http://www.cs.mu.oz.au/~todavies/primes.lisp" rel="nofollow"></a><a href="http://www.cs.mu.oz.au/~todavies/primes.lisp">http://www.cs.mu.oz.au/~todavies/primes.lisp</a> for the source</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todavies</title>
		<link>http://www.chipstips.com/?p=414&#038;cpage=1#comment-90684</link>
		<dc:creator>todavies</dc:creator>
		<pubDate>Thu, 22 Oct 2009 02:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=414#comment-90684</guid>
		<description>I think you are largely suffering from a bad algorithm - using lists is bad when you occasionally want random access (I saw a use of #&#039;last too!!!)... although yes clisp is slow compared to nearly every other lisp unless you are using big numbers (bigger than 8 bytes) cause its the only widely used implementation that doesn&#039;t native compile, but it has GMP,
with my implementation on a 4 year old Thinkpad R60i using sbcl starting with 2&amp;3 in the list:

(time (nth-prime 100000))
Evaluation took:
  2.279 seconds of real time
...snip...

(time (nth-prime 1000000))
Evaluation took:
  49.503 seconds of real time
  28.997812 seconds of total run time (28.861803 user, 0.136009 system)
...snip...</description>
		<content:encoded><![CDATA[<p>I think you are largely suffering from a bad algorithm &#8211; using lists is bad when you occasionally want random access (I saw a use of #&#8217;last too!!!)&#8230; although yes clisp is slow compared to nearly every other lisp unless you are using big numbers (bigger than 8 bytes) cause its the only widely used implementation that doesn&#8217;t native compile, but it has GMP,<br />
with my implementation on a 4 year old Thinkpad R60i using sbcl starting with 2&amp;3 in the list:</p>
<p>(time (nth-prime 100000))<br />
Evaluation took:<br />
  2.279 seconds of real time<br />
&#8230;snip&#8230;</p>
<p>(time (nth-prime 1000000))<br />
Evaluation took:<br />
  49.503 seconds of real time<br />
  28.997812 seconds of total run time (28.861803 user, 0.136009 system)<br />
&#8230;snip&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
