Foreach, Garbage

Topics: Developer Forum
Sep 17, 2012 at 8:22 AM

Hi,

I was wondering if foreach loops should be changed into for loops in Farseer for better performance & carbage collection handling with XNA? Has anyone tried this yet? I'am trying to squeeze some more performance to my game and i came across to these blogs:

http://blogs.msdn.com/b/etayrien/archive/2007/03/17/foreach-garbage-and-the-clr-profiler.aspx

http://geekswithblogs.net/mikebmcl/archive/2010/07/30/wp7-xna-the-gc-and-you-and-silverlight-too.aspx

 

PS. Thanks for the great physics engine!