<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>XNA Framework</title><link>http://forums.xna.com/forums/56.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/114649.aspx</link><pubDate>Wed, 03 Dec 2008 02:42:15 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:114649</guid><dc:creator>JasonD</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/114649.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=114649</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Reality Shift:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;You can also look at the Ship Game starter kit which has a particle system where the bulk of the calculations are done on the GPU.&lt;br /&gt;
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
Ok thanks!  I&amp;#39;ve been lenient at looking at that because I don&amp;#39;t want to rewrite the particle system I already have in place. :S  Maybe for my next game...</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/114597.aspx</link><pubDate>Tue, 02 Dec 2008 23:07:01 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:114597</guid><dc:creator>Reality Shift</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/114597.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=114597</wfw:commentRss><description>You can also look at the Ship Game starter kit which has a particle system where the bulk of the calculations are done on the GPU.&lt;br /&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/114554.aspx</link><pubDate>Tue, 02 Dec 2008 21:40:16 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:114554</guid><dc:creator>JasonD</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/114554.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=114554</wfw:commentRss><description>Thanks &lt;strong&gt;Tennyson&lt;/strong&gt;!  I&amp;#39;ll take a look at that right now. :)</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/114549.aspx</link><pubDate>Tue, 02 Dec 2008 21:31:34 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:114549</guid><dc:creator>Tennyson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/114549.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=114549</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;JasonD:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; I&amp;#39;d like to know more about the caching limitations of the Xbox 360.  You&amp;#39;re talking about the potential of a 1,000 cycles lost due to cache misses.  That&amp;#39;s insane!&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
This article might answer a few questions:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://arstechnica.com/articles/paedia/cpu/xbox360-2.ars"&gt;http://arstechnica.com/articles/paedia/cpu/xbox360-2.ars&lt;/a&gt;&lt;br /&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/114540.aspx</link><pubDate>Tue, 02 Dec 2008 21:01:19 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:114540</guid><dc:creator>JasonD</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/114540.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=114540</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;jwatte:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Each PowerPC core on the Xbox is less powerful than a desktop or laptop x86 chip. The reason is that the PPC core is in-order, which means that even though it runs at 3.2 GHz, as soon as it gets a cache miss, it has to wait for the miss to fill, which could be a thousand cycles. It cannot do out-of-order execution to speculate ahead, which means it can&amp;#39;t magically pre-fetch, nor can it keep running the rest of the instruction stream while waiting for the cache line to fill.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
I&amp;#39;ve just dawned on the fact that the caching issues of the Xbox 360 are a major source of slowdown (at fault of my code which I can fix, but I didn&amp;#39;t realize I had to be so careful).  I&amp;#39;d like to know more about the caching limitations of the Xbox 360.  You&amp;#39;re talking about the potential of a 1,000 cycles lost due to cache misses.  That&amp;#39;s insane!</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/72100.aspx</link><pubDate>Tue, 01 Jul 2008 02:01:37 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:72100</guid><dc:creator>StatusUnknown</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/72100.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=72100</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;ShawMishrak:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;StatusUnknown:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;foreach/for loops will have the exact same generated code for most collection types.
&lt;p&gt;Most properties get inlined...&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
Are you sure about that?&amp;nbsp; A foreach loop over a collection will compile into an IEnumerator access, while a for loop will use indexers.&amp;nbsp; In a lot of cases, the difference is moot, but the difference is there.&amp;nbsp; My experience is that the Xbox JIT&amp;#39;er will inline just about &lt;em&gt;no&lt;/em&gt; property accesses.&amp;nbsp; Besides, an inlined property access will still generate an additional memory copy operation which can add up if you have a lot of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;StatusUnknown:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;With that said, you will get around 1/4 to 1/6 the performance on a 360 logical cpu core to a pc cpu core, so ratio sounds about right.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that most of this difference is a result of the Xbox JIT&amp;#39;er, not the hardware.&amp;nbsp; There are hardware differences that make an Xbox CPU core slower than a desktop CPU core in the general case, but a smart compiler can all but eliminate the difference.&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;
&lt;p&gt;I should have said &amp;#39;the XNA performance on a 360 logical cpu&amp;#39; :-)&lt;/p&gt;
&lt;p&gt;And yes, for the more common collection types, a foreach will be no more expensive than a for loop (Certainly for arrays and generic list&amp;#39;s). The compiler is smart enough to know it doesn&amp;#39;t need an enumerator. There are exceptions though, such as using ICollection as the collection type.&lt;/p&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/72081.aspx</link><pubDate>Mon, 30 Jun 2008 22:57:43 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:72081</guid><dc:creator>jwatte</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/72081.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=72081</wfw:commentRss><description>&lt;br /&gt;
I started thinking about what kind of knowledge a compiler could build to improve cache efficiency of generated code, but came up mostly blank. I suppose the best it could do would be to issue a prefetch for addresses it knows will be dereferenced as far ahead of the dereference as possible, but too aggressive pre-fetching may turn out to be a performance loss, and often the dereference is indirect and can&amp;#39;t be known until it&amp;#39;s actually done. The main problem is that, in a language like C++, the data structure layout is fixed and can&amp;#39;t be re-arranged by the compiler. I suppose in the CLR JIT you might be able to get incremental gains through re-arranging, but the real gain is had when the user re-defines his/her data structures, which the compiler can&amp;#39;t actually do.&lt;br /&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/72052.aspx</link><pubDate>Mon, 30 Jun 2008 20:27:30 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:72052</guid><dc:creator>ShawMishrak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/72052.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=72052</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;jwatte:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;There is nothing that a smart compiler can do about the problem that once you miss the cache, the PowerPC core in the Xbox will stall waiting for memory. (Actually, it will switch to the second hyperthread -- that&amp;#39;s why hyper-threading makes sense on this implementation)
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
That&amp;#39;s the point.&amp;nbsp; A smart compiler will throw sequential program order out the window and rely on data/control dependencies during code generation.&amp;nbsp; The fact that cache misses guarantee a stall (not just increase the probability) can be coded into the compiler&amp;#39;s cost vs. benefit analysis algorithm.&amp;nbsp; As long as the compiler can make reasonable guesses as to the cache size and availability, it can theoretically partition data accesses to maximize cache efficiency.&amp;nbsp; This has a &lt;em&gt;lot&lt;/em&gt; to do with compilers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/72004.aspx</link><pubDate>Mon, 30 Jun 2008 18:20:25 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:72004</guid><dc:creator>jwatte</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/72004.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=72004</wfw:commentRss><description>There is nothing that a smart compiler can do about the problem that once you miss the cache, the PowerPC core in the Xbox will stall waiting for memory. (Actually, it will switch to the second hyperthread -- that&amp;#39;s why hyper-threading makes sense on this implementation)
&lt;p&gt;On the PC, even if a given memory access is stalled waiting for memory, instructions after can still be fetched and dispatched, because of the out-of-order architecture. That&amp;#39;s what allows PC CPUs to effectively hide a lot of memory latency. That has nothing to do with compilers. For good performance on the Xbox, you should do all you can to make your accesses cache local.&lt;/p&gt;
&lt;p&gt;When it comes to foreach vs for, a foreach over a native language array will not go through IEnumerator. Also, that foreach will be more efficient than a for loop, because there will be no index range checking on access. If you&amp;#39;re using List&amp;lt;X&amp;gt; then you won&amp;#39;t get that benefit, because List&amp;lt;X&amp;gt;[int] will always check the range. Then, you have to trade the overhead of index range checking versus the garbage of the IEnumerator. Even in an unchecked context, List&amp;lt;X&amp;gt;[int] will check for range, because the List class wasn&amp;#39;t compiled as unchecked.&lt;/p&gt;
&lt;p&gt;Meanwhile, a native array will run the fastest if you use a for loop over indices, inside an unchecked context, because it will then not do range checking. It&amp;#39;s up to you to make sure you don&amp;#39;t have a bug at that point! In fact, at that point, you might as well use unsafe code with a fixed pointer to the array, to hoist out that final memory dereference per access, in case the GC moved the element. If you&amp;#39;re not allocating memory inside the loop, using fixed is not much of a problem. Beware that other threads may allocate memory, and fixing the pointer would make the job of a parallel GC harder when it runs for those threads. I believe that the XBox JIT is dumber than dirt, though, and does stop-and-collect, with lock-out.&lt;/p&gt;
&lt;p&gt;Oh, how useful it would be if we could get a tool like VTune for the XBox CLR...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/71898.aspx</link><pubDate>Mon, 30 Jun 2008 03:35:40 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:71898</guid><dc:creator>ShawMishrak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/71898.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=71898</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;StatusUnknown:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;foreach/for loops will have the exact same generated code for most collection types.
&lt;p&gt;Most properties get inlined...&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
Are you sure about that?&amp;nbsp; A foreach loop over a collection will compile into an IEnumerator access, while a for loop will use indexers.&amp;nbsp; In a lot of cases, the difference is moot, but the difference is there.&amp;nbsp; My experience is that the Xbox JIT&amp;#39;er will inline just about &lt;em&gt;no&lt;/em&gt; property accesses.&amp;nbsp; Besides, an inlined property access will still generate an additional memory copy operation which can add up if you have a lot of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;StatusUnknown:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;With that said, you will get around 1/4 to 1/6 the performance on a 360 logical cpu core to a pc cpu core, so ratio sounds about right.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that most of this difference is a result of the Xbox JIT&amp;#39;er, not the hardware.&amp;nbsp; There are hardware differences that make an Xbox CPU core slower than a desktop CPU core in the general case, but a smart compiler can all but eliminate the difference.&lt;/p&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/71888.aspx</link><pubDate>Mon, 30 Jun 2008 03:04:50 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:71888</guid><dc:creator>StatusUnknown</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/71888.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=71888</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;zziemke:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;
&lt;p&gt;We tried various perfomance optimizations:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;ref Texture2D&lt;/li&gt;
    &lt;li&gt;foreach -&amp;gt; forr&lt;/li&gt;
    &lt;li&gt;replace properties with fields&lt;/li&gt;
&lt;/ul&gt;&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;

&lt;p&gt;your optimisations aren&amp;#39;t really...&lt;/p&gt;
&lt;p&gt;Passing a Texture2D by ref won&amp;#39;t help you. Passing by ref will only help with value types, in fact passing a class by ref is most likely less efficient (although you&amp;#39;d never notice it).&lt;/p&gt;
&lt;p&gt;foreach/for loops will have the exact same generated code for most collection types.&lt;/p&gt;
&lt;p&gt;Most properties get inlined...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With that said, you will get around 1/4 to 1/6 the performance on a 360 logical cpu core to a pc cpu core, so ratio sounds about right. If you are drawing each particle as a single draw call, then 12,000 particles is extremly good.&lt;/p&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/71767.aspx</link><pubDate>Sun, 29 Jun 2008 09:28:00 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:71767</guid><dc:creator>JoKie</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/71767.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=71767</wfw:commentRss><description>For those interested in HLSL and particle-systems I found some nice articles:
&lt;p&gt;&lt;a target="_blank" title="http://www.riemers.net/eng/Tutorials/DirectX/Csharp/Series3/HLSL_Introduction.php" href="http://www.riemers.net/eng/Tutorials/DirectX/Csharp/Series3/HLSL_Introduction.php"&gt;HLSL Introduction&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;a target="_blank" title="http://www.ziggyware.com/news.php?readmore=659" href="http://www.ziggyware.com/news.php?readmore=659"&gt;Particle Tutorial Series&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" title="http://www.catalinzima.com/?page_id=97" href="http://www.catalinzima.com/?page_id=97"&gt;Particle Systems (Catalin Zima - XNA and HLSL blog)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" title="http://www.ziggyware.com/news.php?readmore=659" href="http://www.ziggyware.com/news.php?readmore=659"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;a target="_blank" title="http://www.riemers.net/eng/Tutorials/DirectX/Csharp/Series3/HLSL_Introduction.php" href="http://www.riemers.net/eng/Tutorials/DirectX/Csharp/Series3/HLSL_Introduction.php"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/71762.aspx</link><pubDate>Sun, 29 Jun 2008 09:06:29 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:71762</guid><dc:creator>JoKie</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/71762.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=71762</wfw:commentRss><description>Thank you for the information!
&lt;p&gt;If I understand you right, there&amp;#39;s nothing we can do in this case as long as it is limited to the CPU and we should try to port our particle-system to the GPU.&lt;/p&gt;
&lt;p&gt;Well, then it looks like I&amp;#39;ll have to get into shader-programming! XD&lt;/p&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/71709.aspx</link><pubDate>Sat, 28 Jun 2008 23:54:38 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:71709</guid><dc:creator>jwatte</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/71709.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=71709</wfw:commentRss><description>Each PowerPC core on the Xbox is less powerful than a desktop or laptop x86 chip. The reason is that the PPC core is in-order, which means that even though it runs at 3.2 GHz, as soon as it gets a cache miss, it has to wait for the miss to fill, which could be a thousand cycles. It cannot do out-of-order execution to speculate ahead, which means it can&amp;#39;t magically pre-fetch, nor can it keep running the rest of the instruction stream while waiting for the cache line to fill.
&lt;p&gt;Second, the compact CLR JIT that is used on the Xbox is not written for high performance. It will not inline even small functions, and it will not generate very good code for floating point math. Thus, the C# implementation will be significantly hampered compared to a C++ implementation of the same code for the Xbox.&lt;/p&gt;
&lt;p&gt;Third, most of the Xbox floating point power comes from the vector extensions (AltiVec, with small modifications). Unfortunately, there is no way to get at those extensions at all from C#, and the compact CLR JIT doesn&amp;#39;t know how to use them, either.&lt;/p&gt;
So, no, there&amp;#39;s no way that the Xbox will run the same code as the PC as fast, when it is CPU limited. However, the GPU in the Xbox is very nice, has great fill rate, and can run rings around most PC graphics cards (except for the most expensive ones). Thus, when you are fill rate limited, or perhaps vertex transform limited, you will likely find the Xbox to perform very well.&lt;br /&gt;</description></item><item><title>Re: xbox360 performance problems</title><link>http://forums.xna.com/forums/thread/71683.aspx</link><pubDate>Sat, 28 Jun 2008 20:56:35 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:71683</guid><dc:creator>JoKie</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/71683.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=71683</wfw:commentRss><description>&lt;p&gt;We aren&amp;#39;t using multiple threads yet, but shouldn&amp;#39;t it be possible to get it running on 360 at least as fast as on PC without multiple threads?&lt;/p&gt;
Our particle-methods:&lt;br /&gt;
&lt;p&gt;&amp;nbsp;
&lt;div style="overflow:auto;background-color:white;width:100%;height:497px;font-family:Courier New;font-size:11px;"&gt;
&lt;table style="border-width:0px;margin:2px 0px;width:99%;border-collapse:collapse;" cellpadding="0" cellspacing="0"&gt;
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;public&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;void&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;Update(GameTime&amp;nbsp;gameTime,&amp;nbsp;Vector4&amp;nbsp;segmentBounds)&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;if&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;(amount&amp;nbsp;&amp;lt;=&amp;nbsp;0)&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetRandomMove(segmentBounds);&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;amount&amp;nbsp;+=&amp;nbsp;(&lt;font style="color:blue;"&gt;float&lt;/font&gt;&lt;font style="font-size:11px;"&gt;)gameTime.ElapsedGameTime.TotalSeconds&amp;nbsp;/&amp;nbsp;moveTime;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;this&lt;/font&gt;&lt;font style="font-size:11px;"&gt;.localPosition&amp;nbsp;=&amp;nbsp;Vector2.SmoothStep(pointA,&amp;nbsp;pointB,&amp;nbsp;amount);&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;this&lt;/font&gt;&lt;font style="font-size:11px;"&gt;.Position&amp;nbsp;=&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;new&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;Vector2(segmentBounds.X,&amp;nbsp;segmentBounds.Y)&amp;nbsp;+&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;this&lt;/font&gt;&lt;font style="font-size:11px;"&gt;.localPosition;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;this&lt;/font&gt;&lt;font style="font-size:11px;"&gt;.Scale&amp;nbsp;=&amp;nbsp;Vector2.SmoothStep(&lt;/font&gt;&lt;font style="color:blue;"&gt;new&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;Vector2(ScaleA),&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;new&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;Vector2(ScaleB),&amp;nbsp;amount).X;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;if&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;(amount&amp;nbsp;&amp;gt;=&amp;nbsp;1f)&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;amount&amp;nbsp;=&amp;nbsp;0f;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;private&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;void&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;SetRandomMove(Vector4&amp;nbsp;segmentBounds)&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pointA&amp;nbsp;=&amp;nbsp;&lt;font style="color:blue;"&gt;this&lt;/font&gt;&lt;font style="font-size:11px;"&gt;.localPosition;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pointB&amp;nbsp;=&amp;nbsp;Utilities.GetRandomPosition(GetParticleField(segmentBounds),&amp;nbsp;&lt;font style="color:blue;"&gt;this&lt;/font&gt;&lt;font style="font-size:11px;"&gt;.Origin);&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScaleA&amp;nbsp;=&amp;nbsp;&lt;font style="color:blue;"&gt;this&lt;/font&gt;&lt;font style="font-size:11px;"&gt;.Scale;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScaleB&amp;nbsp;=&amp;nbsp;Utilities.Range(MyPlayer.SnakeAttributes.ParticleMinScale,&amp;nbsp;MyPlayer.SnakeAttributes.ParticleMaxScale);&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;moveTime&amp;nbsp;=&amp;nbsp;baseSpeed&amp;nbsp;+&amp;nbsp;Utilities.Range(-speedVariation,&amp;nbsp;speedVariation);&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;private&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;Vector4&amp;nbsp;GetParticleField(Vector4&amp;nbsp;segmentBounds)&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;return&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;new&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;Vector4(-((segmentBounds.W&amp;nbsp;*&amp;nbsp;MyPlayer.SnakeAttributes.ParticleMoveRegionMultiplicator&amp;nbsp;-&amp;nbsp;segmentBounds.W)&amp;nbsp;/&amp;nbsp;2f),&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-((segmentBounds.Z&amp;nbsp;*&amp;nbsp;MyPlayer.SnakeAttributes.ParticleMoveRegionMultiplicator&amp;nbsp;-&amp;nbsp;segmentBounds.Z)&amp;nbsp;/&amp;nbsp;2f),&amp;nbsp;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;segmentBounds.W&amp;nbsp;*&amp;nbsp;MyPlayer.SnakeAttributes.ParticleMoveRegionMultiplicator,&amp;nbsp;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;segmentBounds.Z&amp;nbsp;*&amp;nbsp;MyPlayer.SnakeAttributes.ParticleMoveRegionMultiplicator);&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
&lt;/p&gt;</description></item></channel></rss>