<?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: Sieve of Eratosthenes in PhP</title>
	<atom:link href="http://www.think-lamp.com/2008/08/sieve-of-eratosthenes-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.think-lamp.com/2008/08/sieve-of-eratosthenes-in-php/</link>
	<description>Everything Linux Apache Php Mysql</description>
	<lastBuildDate>Wed, 13 Apr 2011 07:34:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://www.think-lamp.com/2008/08/sieve-of-eratosthenes-in-php/comment-page-1/#comment-6603</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 16 Aug 2010 02:16:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.think-lamp.com/?p=37#comment-6603</guid>
		<description>[php]
&lt;?php

echo &quot;test&quot;;
?&gt;
[/php]</description>
		<content:encoded><![CDATA[<pre class="brush: php;">
&lt;?php

echo &quot;test&quot;;
?&gt;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali</title>
		<link>http://www.think-lamp.com/2008/08/sieve-of-eratosthenes-in-php/comment-page-1/#comment-6476</link>
		<dc:creator>Ali</dc:creator>
		<pubDate>Sun, 08 Aug 2010 21:44:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.think-lamp.com/?p=37#comment-6476</guid>
		<description>Comment system isn&#039;t great &gt;.&lt;

Ignore the last $total+3x }</description>
		<content:encoded><![CDATA[<p>Comment system isn&#8217;t great &gt;.&lt;</p>
<p>Ignore the last $total+3x }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali</title>
		<link>http://www.think-lamp.com/2008/08/sieve-of-eratosthenes-in-php/comment-page-1/#comment-6475</link>
		<dc:creator>Ali</dc:creator>
		<pubDate>Sun, 08 Aug 2010 21:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.think-lamp.com/?p=37#comment-6475</guid>
		<description>I gave this a go, finds all primes &lt; 1million in ~0.44s

function CountPrimes($max) {
	$vals = Array();
	$total = 1;
	for($i=3; $i&lt;$max; $i += 2) {
		if(!isset($vals[$i])) {
			$total++;
			$l = 2*$i;
			for($j = $i*$i; $j &lt; $max; $j += $l) {
				$vals[$j] = true;
			}
		}
	}
	return $total;
}                          

  





















		}
	}
	return $total;
}</description>
		<content:encoded><![CDATA[<p>I gave this a go, finds all primes &lt; 1million in ~0.44s</p>
<p>function CountPrimes($max) {<br />
	$vals = Array();<br />
	$total = 1;<br />
	for($i=3; $i&lt;$max; $i += 2) {<br />
		if(!isset($vals[$i])) {<br />
			$total++;<br />
			$l = 2*$i;<br />
			for($j = $i*$i; $j &lt; $max; $j += $l) {<br />
				$vals[$j] = true;<br />
			}<br />
		}<br />
	}<br />
	return $total;<br />
}                          </p>
<p>		}<br />
	}<br />
	return $total;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: playfish</title>
		<link>http://www.think-lamp.com/2008/08/sieve-of-eratosthenes-in-php/comment-page-1/#comment-5071</link>
		<dc:creator>playfish</dc:creator>
		<pubDate>Sun, 21 Mar 2010 04:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.think-lamp.com/?p=37#comment-5071</guid>
		<description>i was beginning to feel i may end up being the only woman / man which thought about this, at the very least currently i realize i&#039;m not loco :) i am going to be sure to take a look at some other posts just after i get some caffeine in me, it can be stressful to read with out my coffee, I was up late last night jamming facebook poker and after downing a few ales i ended up giving up all my zynga poker chips take care :)</description>
		<content:encoded><![CDATA[<p>i was beginning to feel i may end up being the only woman / man which thought about this, at the very least currently i realize i&#8217;m not loco <img src='http://www.think-lamp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  i am going to be sure to take a look at some other posts just after i get some caffeine in me, it can be stressful to read with out my coffee, I was up late last night jamming facebook poker and after downing a few ales i ended up giving up all my zynga poker chips take care <img src='http://www.think-lamp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RiK0</title>
		<link>http://www.think-lamp.com/2008/08/sieve-of-eratosthenes-in-php/comment-page-1/#comment-3054</link>
		<dc:creator>RiK0</dc:creator>
		<pubDate>Wed, 26 Aug 2009 16:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.think-lamp.com/?p=37#comment-3054</guid>
		<description>This is not the Sieve of Eratosthenes. 
This is a variation on the classical trial division algorithm.
That is the reason why this is so slow, it does more computation *and* 
uses modulo instead of simple addition.</description>
		<content:encoded><![CDATA[<p>This is not the Sieve of Eratosthenes.<br />
This is a variation on the classical trial division algorithm.<br />
That is the reason why this is so slow, it does more computation *and*<br />
uses modulo instead of simple addition.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

