<?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: Parallel.For quirk can leave your code running sequentially</title>
	<atom:link href="http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 22:10:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/comment-page-1/#comment-3689</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Fri, 23 Apr 2010 06:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/#comment-3689</guid>
		<description>Zaratustra,

I think you meant 2, not 8, in your code.</description>
		<content:encoded><![CDATA[<p>Zaratustra,</p>
<p>I think you meant 2, not 8, in your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Arno</title>
		<link>http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/comment-page-1/#comment-1137</link>
		<dc:creator>David Arno</dc:creator>
		<pubDate>Thu, 12 Jun 2008 15:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/#comment-1137</guid>
		<description>Dreea,

Have you tried the &lt;a href=&quot;http://www.davidarno.org/277&quot; rel=&quot;nofollow&quot;&gt;June CTP&lt;/a&gt; yet? Does it make a difference to what you are doing? I haven&#039;t tried it yet myself to see if there is a performance gain, so would be interested to know of others&#039; experiences.</description>
		<content:encoded><![CDATA[<p>Dreea,</p>
<p>Have you tried the <a href="http://www.davidarno.org/277" rel="nofollow">June CTP</a> yet? Does it make a difference to what you are doing? I haven&#8217;t tried it yet myself to see if there is a performance gain, so would be interested to know of others&#8217; experiences.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dreea</title>
		<link>http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/comment-page-1/#comment-1136</link>
		<dc:creator>Dreea</dc:creator>
		<pubDate>Thu, 12 Jun 2008 14:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/#comment-1136</guid>
		<description>Well, I replace Parallel.For with Parallel.Do and it seems like a different thread is being used for each method call .
As for the parallel processing time it&#039;s better than the sequential time, but only after the parrallel.do/for are already called once(first time -&gt; bad time, all the next times-&gt; expected time). I guess this is due to a one-time start-up cost on first usage.
Thanks for replies</description>
		<content:encoded><![CDATA[<p>Well, I replace Parallel.For with Parallel.Do and it seems like a different thread is being used for each method call .<br />
As for the parallel processing time it&#8217;s better than the sequential time, but only after the parrallel.do/for are already called once(first time -&gt; bad time, all the next times-&gt; expected time). I guess this is due to a one-time start-up cost on first usage.<br />
Thanks for replies</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zaratustra</title>
		<link>http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/comment-page-1/#comment-1122</link>
		<dc:creator>Zaratustra</dc:creator>
		<pubDate>Fri, 23 May 2008 02:43:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/#comment-1122</guid>
		<description>Dreea,

a simple workaround which everyone will be using once they discover this:

Parallel.For(0, 16, i =&gt;
{
   if (i%8==0) ProcessImage(i/8);
});</description>
		<content:encoded><![CDATA[<p>Dreea,</p>
<p>a simple workaround which everyone will be using once they discover this:</p>
<p>Parallel.For(0, 16, i =&gt;<br />
{<br />
   if (i%8==0) ProcessImage(i/8);<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Arno</title>
		<link>http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/comment-page-1/#comment-1117</link>
		<dc:creator>David Arno</dc:creator>
		<pubDate>Wed, 14 May 2008 13:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/#comment-1117</guid>
		<description>Dreea,

It is worth remembering that the library is only an early alpha test release and so it will likely improve by the time the release version comes out. However you have hit one of the problems with parallelism on the head: it&#039;s hard and the simple solution is often very inefficient. It doesn&#039;t therefore surprise me that your serial solution was faster than the parallel one. 

If your images are less than 1MB in size, perhaps processing two images at once, rather than two halves simultaneously, might give you speed increases?</description>
		<content:encoded><![CDATA[<p>Dreea,</p>
<p>It is worth remembering that the library is only an early alpha test release and so it will likely improve by the time the release version comes out. However you have hit one of the problems with parallelism on the head: it&#8217;s hard and the simple solution is often very inefficient. It doesn&#8217;t therefore surprise me that your serial solution was faster than the parallel one. </p>
<p>If your images are less than 1MB in size, perhaps processing two images at once, rather than two halves simultaneously, might give you speed increases?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dreea</title>
		<link>http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/comment-page-1/#comment-1113</link>
		<dc:creator>dreea</dc:creator>
		<pubDate>Mon, 12 May 2008 16:18:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidarno.org/2007/12/18/parallelfor-quirk-can-leave-your-code-running-sequentially/#comment-1113</guid>
		<description>Is this a good thing? I don&#039;t know very much about multi threading but I am trying to write a data parallel application and the difference between parallel and sequential code is very slight. I even have cases(processing image under 1 mb) when the non parallel code produces much better results then the parallel one. I am only trying to have my application process one half of the image by one processor and the other half bu the other processor. I think I would write my own code ...</description>
		<content:encoded><![CDATA[<p>Is this a good thing? I don&#8217;t know very much about multi threading but I am trying to write a data parallel application and the difference between parallel and sequential code is very slight. I even have cases(processing image under 1 mb) when the non parallel code produces much better results then the parallel one. I am only trying to have my application process one half of the image by one processor and the other half bu the other processor. I think I would write my own code &#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

