A link to a great post comparing garbage collection and manual memory management

Here’s a great post I found by reading planet D:
Real World Comparison, GC vs. Manual Memory Management

It mostly proves more scientifically what was my gut feeling of garbage collection (GC) (as it was implemented in the D programming language) versus manual memory management. I tried doing OpenGL and realtime video stuff with D, and I really got very productive with the D syntax. But the thing that got in my way in the end, was the GC. When I had many objects, my program started to stutter. And that’s when I started to think it was the GC doing it. I did everything I could think of to remedy the situation, but I found no other solution than to go back to C++, and it’s tested and tried, silly but working tools.

I would love a great language that had something like D syntax, the performance and manual memory management of C++. (Oh, and I think there should be a way to distribute software in source form for binary compatibility with the code being obfuscated, for the closed source people, but that’s another issue.)
I don’t think that any of the languages currently available do it the right way. Vala (or Genie) comes close, but I still think that the best language for real life work currently is C++. Maybe a good IDE might help me, we’ll see.

Advertisements

6 comments

    • I don’t have that much insights on the matter. Just some feelings, and I don’t think it’s really fair for D. I think the more “scientific” comparison in the article that I linked to is better than my opinion! I still think D is a great language, though. Just possibly not suited for me for now.

    • It kind of allows it, but then you can’t use most of the standard libraries. And I also believe it is very difficult to use classes without it. D is a language that was designed around the GC. It will suit some other purposes, and maybe if the GC gets faster and the tooling gets better in the future, maybe then it will be better suited for realtime graphics programming.

      • I admit that the actual standard libraries are made around the GC, but I know that there some movement to fix it, allowing to setting it to manual memory allocation. But doing manual memory allocation with classes you only need to overload the new and deleted methods to do your own memory management, and ever mix manual management with GC management . See it at http://dlang.org/memory.html#newdelete


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s