<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Alice, Bob and Mallory: Finding primes in parallel</title>
    <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>metasyntactics</description>
    <item>
      <title>Finding primes in parallel</title>
      <description>&lt;p&gt;&lt;a href="http://www.codethinked.com/page/About-Me.aspx"&gt;Justin Etheredge&lt;/a&gt; has been blogging about his &lt;a href="http://www.codethinked.com/post/2010/01/08/TekPubs-Mastering-LINQ-Challenge.aspx"&gt;challenge&lt;/a&gt; to find prime numbers with LINQ. He &lt;a href="http://www.codethinked.com/post/2010/01/10/The-TekPub-LINQ-Challenge-Part-2-Faster-Algorithms.aspx"&gt;later&lt;/a&gt; used &lt;code&gt;AsParallel()&lt;/code&gt; (coming in .NET 4) to speed things up and then followed that up with &lt;a href="http://www.codethinked.com/post/2010/01/12/The-TekPub-LINQ-Challenge-And-The-Sieve-Of-Eratosthenes.aspx"&gt;a post&lt;/a&gt; about using &lt;a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes"&gt;The Sieve Of Eratosthenes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As you can see in the comments of those posts I tried to speed the Sieve of Eratosthenes up by using &lt;code&gt;Parallel.For&lt;/code&gt; in the inner loop. I also tried AsParallel() in the LINQ expression but it made no difference in either case. At most it got 5% faster. I'm not sure but it could be that because SoE is very memory intense we could have a scaling issue and maybe also memory bandwidth exhaustion. This is mere speculation.&lt;/p&gt;

&lt;p&gt;I then searched for other algorithms and found &lt;a href="http://en.wikipedia.org/wiki/Sieve_of_Atkin"&gt;The Sieve of Atkin&lt;/a&gt;. It uses less memory than SoE so I thought I'd give it a try.&lt;/p&gt;

&lt;p&gt;I set the limit to 20,000,000 and then benchmarked it. It timed in on 2.48s so actually worse than the 2.2s that SoE took. Not good!
Then I added &lt;code&gt;Parallel.For&lt;/code&gt; in the loop that did most of the work and  lo and behold, it scaled! I have two cores in my machine (T7200@2.0GHz) and the average runtime went down to 1.26s. That's almost linear and surprisingly good! If you happen have a quad core (or more) and feel like trying it out then please contact me. It would be interesting to see if it scales further. &lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;25&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;35&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;38&lt;tt&gt;
&lt;/tt&gt;39&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;40&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;41&lt;tt&gt;
&lt;/tt&gt;42&lt;tt&gt;
&lt;/tt&gt;43&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span style="color:#080;font-weight:bold"&gt;static&lt;/span&gt; List&amp;lt;&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt;&amp;gt; FindPrimesBySieveOfAtkins(&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; max)&lt;tt&gt;
&lt;/tt&gt;{&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; isPrime = new BitArray((&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt;)max+&lt;span style="color:#00D;font-weight:bold"&gt;1&lt;/span&gt;, &lt;span style="color:#038;font-weight:bold"&gt;false&lt;/span&gt;);&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; sqrt = (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt;)Math.Sqrt(max);&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    Parallel.For(&lt;span style="color:#00D;font-weight:bold"&gt;1&lt;/span&gt;, sqrt, x =&amp;gt;&lt;tt&gt;
&lt;/tt&gt;    {&lt;tt&gt;
&lt;/tt&gt;        &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; xx = x * x;&lt;tt&gt;
&lt;/tt&gt;        &lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; y = &lt;span style="color:#00D;font-weight:bold"&gt;1&lt;/span&gt;; y &amp;lt;= sqrt; y++)&lt;tt&gt;
&lt;/tt&gt;        {&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; yy = y * y;&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; n = &lt;span style="color:#00D;font-weight:bold"&gt;4&lt;/span&gt; * xx + yy;&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (n &amp;lt;= max &amp;amp;&amp;amp; (n % &lt;span style="color:#00D;font-weight:bold"&gt;12&lt;/span&gt; == &lt;span style="color:#00D;font-weight:bold"&gt;1&lt;/span&gt; || n % &lt;span style="color:#00D;font-weight:bold"&gt;12&lt;/span&gt; == &lt;span style="color:#00D;font-weight:bold"&gt;5&lt;/span&gt;))&lt;tt&gt;
&lt;/tt&gt;                isPrime[n] = !isPrime[n];&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;            n = &lt;span style="color:#00D;font-weight:bold"&gt;3&lt;/span&gt; * xx + yy;&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (n &amp;lt;= max &amp;amp;&amp;amp; n % &lt;span style="color:#00D;font-weight:bold"&gt;12&lt;/span&gt; == &lt;span style="color:#00D;font-weight:bold"&gt;7&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;                isPrime[n] = !isPrime[n];&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;            n = &lt;span style="color:#00D;font-weight:bold"&gt;3&lt;/span&gt; * xx - yy;&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (x &amp;gt; y &amp;amp;&amp;amp; n &amp;lt;= max &amp;amp;&amp;amp; n % &lt;span style="color:#00D;font-weight:bold"&gt;12&lt;/span&gt; == &lt;span style="color:#00D;font-weight:bold"&gt;11&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;                isPrime[n] = !isPrime[n];&lt;tt&gt;
&lt;/tt&gt;        }&lt;tt&gt;
&lt;/tt&gt;    });&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; primes = new List&amp;lt;&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt;&amp;gt;() { &lt;span style="color:#00D;font-weight:bold"&gt;2&lt;/span&gt;, &lt;span style="color:#00D;font-weight:bold"&gt;3&lt;/span&gt; };&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; n = &lt;span style="color:#00D;font-weight:bold"&gt;5&lt;/span&gt;; n &amp;lt;= sqrt; n++)&lt;tt&gt;
&lt;/tt&gt;    {&lt;tt&gt;
&lt;/tt&gt;        &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (isPrime[n])&lt;tt&gt;
&lt;/tt&gt;        {&lt;tt&gt;
&lt;/tt&gt;            primes.Add(n);&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; nn = n * n;&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; k = nn; k &amp;lt;= max; k += nn)&lt;tt&gt;
&lt;/tt&gt;                isPrime[k] = &lt;span style="color:#038;font-weight:bold"&gt;false&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;        }&lt;tt&gt;
&lt;/tt&gt;    }&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; n = sqrt + &lt;span style="color:#00D;font-weight:bold"&gt;1&lt;/span&gt;; n &amp;lt;= max; n++)&lt;tt&gt;
&lt;/tt&gt;        &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (isPrime[n])&lt;tt&gt;
&lt;/tt&gt;            primes.Add(n);&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;return&lt;/span&gt; primes;&lt;tt&gt;
&lt;/tt&gt;}&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;This is C# 4.0 code, compiled in Visual C# 2010 Express Beta 2.&lt;/p&gt;

&lt;p&gt;&lt;font style="color:red;font-weight:bold"&gt;Edit 2010-01-20&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Indications are that this does in fact not scale very good on a quad core. It's even worse, it seems it scales good on my old T7200 but not on a dual core E6320. I don't know why but of course the shared state of the &lt;strong&gt;isPrime&lt;/strong&gt; &lt;code&gt;BitArray&lt;/code&gt; is a huge problem and maybe it could be that differences in CPU architecture (FSB speed, caches and so on) in the E6320 is an explanation. Average execution time on the E6320 was 1290ms in a single thread and 1064ms in two.&lt;/p&gt;

&lt;p&gt;If you want to try this in an older version of C# than 4.0 then check out &lt;a href="http://coding-time.blogspot.com/2008/03/implement-your-own-parallelfor-in-c.html"&gt;this post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A reader asked how I timed the executions. Here's how.&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; steps = new List&amp;lt;&lt;span style="color:#339;font-weight:bold"&gt;long&lt;/span&gt;&amp;gt;();&lt;tt&gt;
&lt;/tt&gt;&lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; watch = new Stopwatch();&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; i = &lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;; i &amp;lt; &lt;span style="color:#00D;font-weight:bold"&gt;10&lt;/span&gt;; i++) &lt;tt&gt;
&lt;/tt&gt;{&lt;tt&gt;
&lt;/tt&gt;    watch.Reset();&lt;tt&gt;
&lt;/tt&gt;    watch.Start();&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; primes = FindPrimesBySieveOfAtkins(&lt;span style="color:#00D;font-weight:bold"&gt;20000000&lt;/span&gt;);&lt;tt&gt;
&lt;/tt&gt;    watch.Stop();&lt;tt&gt;
&lt;/tt&gt;    Console.WriteLine(watch.ElapsedMilliseconds.ToString());&lt;tt&gt;
&lt;/tt&gt;    steps.Add(watch.ElapsedMilliseconds);&lt;tt&gt;
&lt;/tt&gt;}&lt;tt&gt;
&lt;/tt&gt;Console.WriteLine(&lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;span style=""&gt;Average: &lt;/span&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; + steps.Average().ToString());&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;</description>
      <pubDate>Thu, 14 Jan 2010 22:55:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:2c932b6d-8c9c-4532-9b8f-85ea02fdd193</guid>
      <author>Jonas Elfström</author>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel</link>
      <category>C#</category>
      <category>Java</category>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;&lt;a href="http://coding-time.blogspot.com/2008/03/implement-your-own-parallelfor-in-c.html" rel="nofollow"&gt;http://coding-time.blogspot.com/2008/03/implement-your-own-parallelfor-in-c.html&lt;/a&gt; - makes it possible to run FindPrimesBySieveOfAtkins unchanged in C# 2.0-3.5.&lt;/p&gt;</description>
      <pubDate>Wed, 20 Jan 2010 09:11:22 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d5f02f7b-3ad8-44c6-b427-17d58eec4f51</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3939</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;So should maybe use the Set method instead then? Or doesn&amp;#8217;t make much difference perhaps&amp;#8230;&lt;/p&gt;

&lt;p&gt;Thanks for the link. Will check it out :)&lt;/p&gt;</description>
      <pubDate>Tue, 19 Jan 2010 18:33:16 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:ab5f14c5-6d7f-4149-84cb-383057d2e248</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3934</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;&lt;i&gt;&amp;#8220;I was wondering if it could be done in a nice way without using Parallel.&amp;#8221;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Check out:  &lt;a href="http://www.codeproject.com/KB/dotnet/PoorMansParallelForEach.aspx" rel="nofollow"&gt;http://www.codeproject.com/KB/dotnet/PoorMansParallelForEach.aspx&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 16 Jan 2010 16:11:21 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:cc5562be-58a8-4d77-b9f1-bc2ff135ce61</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3919</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;If Holterman is correct then my usage is thread safe: &lt;a href="http://stackoverflow.com/questions/1213997/is-there-a-generic-type-safe-bitarray-in-net/1214686#1214686" rel="nofollow"&gt;http://stackoverflow.com/questions/1213997/is-there-a-generic-type-safe-bitarray-in-net/1214686#1214686&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 17:24:41 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:5c6e0ff7-7806-4f22-9995-72d7d9531954</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3914</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;That&amp;#8217;s for &amp;#8220;long, ulong, double, and decimal&amp;#8221;.
Read/write of booleans is atomic. I&amp;#8217;m just not sure that isPrime[n] = !isPrime[n]; is the same as 
Boolean test = false;
test = !test;
which would be atomic.&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 16:23:15 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:254adce2-07ea-4bbf-adec-abf09c5dbf4c</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3913</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;From that link you posted: &amp;#8220;Aside from the library functions designed for that purpose, there is no guarantee of atomic read-modify-write, such as in the case of increment or decrement.&amp;#8221; &amp;#8211; Wouldn&amp;#8217;t that mean that it is not thread-safe? or?&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 15:50:13 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:0fbcedf0-41f7-48b3-a761-e72922250f46</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3912</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;But that would remove the parallelism :p I was wondering if it could be done in a nice way without using Parallel.For, but still have the parallelism. (So do whatever Parallel.For does yourself)&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 15:47:57 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:e3c5ceb0-c341-430d-be76-77eccded5be8</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3911</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Jonas Elfström</title>
      <description>&lt;p&gt;Replace the Parallel.For with
for (int x = 1; x &amp;lt;= sqrt; x++)
and remove ); from row 24 and you should be good to go.&lt;/p&gt;

&lt;p&gt;If I understand 
&lt;a href="http://bit.ly/8lZagW"&gt;http://bit.ly/8lZagW&lt;/a&gt; correctly the isPrime[n] = !isPrime[n]; is an atomic operation but I have to investigate the matter of thread safety further. Thanks!&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 13:33:16 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:83d5ec5d-e28b-4bde-9d11-5c211ea3d7fb</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3909</link>
    </item>
    <item>
      <title>"Finding primes in parallel" by Svish</title>
      <description>&lt;p&gt;Are BitArrays thread-safe, or how does that work?&lt;/p&gt;

&lt;p&gt;Is it possible to write a version of this without the Parrallel.For method? Well, I suppose it is possible of course, but would it be a big mess? :p&lt;/p&gt;</description>
      <pubDate>Fri, 15 Jan 2010 11:03:18 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:16e6e69c-cc7a-47ee-92b3-8a2a7904f05f</guid>
      <link>http://alicebobandmallory.com/articles/2010/01/14/prime-factorization-in-parallel#comment-3908</link>
    </item>
  </channel>
</rss>
