GC vs. Manual Memory Management Real World Comparison

Nathan M. Swan nathanmswan at gmail.com
Wed Sep 5 13:35:37 PDT 2012


On Wednesday, 5 September 2012 at 11:03:03 UTC, Benjamin Thaut 
wrote:
> I rewrote a 3d game I created during my studies with D 2.0 to 
> manual memory mangement. If I'm not studying I'm working in the 
> 3d Engine deparement of Havok. As I needed to pratice manual 
> memory management and did want to get rid of the GC in D for 
> quite some time, I did go through all this effort to create a 
> GC free version of my game.
>
> The results are:
>
>     DMD GC Version: 71 FPS, 14.0 ms frametime
>     GDC GC Version: 128.6 FPS, 7.72 ms frametime
>     DMD MMM Version: 142.8 FPS, 7.02 ms frametime
>
> GC collection times:
>
>     DMD GC Version: 8.9 ms
>     GDC GC Version: 4.1 ms
>
> As you see the manual managed version is twice as fast as the 
> garbage collected one. Even the highly optimized version 
> created with GDC is still slower the the manual memory 
> management.
>
> You can find the full article at:
>
> http://3d.benjamin-thaut.de/?p=20#more-20
>
>
> Feedback is welcome.
>
> Kind Regards
> Benjamin Thaut

Did you try GC.disable/enable?


More information about the Digitalmars-d-announce mailing list