Linked by Thom Holwerda on Thu 6th Sep 2012 21:32 UTC, submitted by MOS6510
Benchmarks "During the 4th Semester of my studies I wrote a small 3d spaceship deathmatch shooter with the D-Programming language. It was created within 3 Months time and allows multiple players to play deathmatch over local area network. All of the code was written with a garbage collector in mind and made wide usage of the D standard library phobos. After the project was finished I noticed how much time is spend every frame for garbage collection, so I decided to create a version of the game which does not use a GC, to improve performance."
Thread beginning with comment 534239
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[5]: yes... but why?
by moondevil on Fri 7th Sep 2012 10:56 UTC in reply to "RE[4]: yes... but why?"
moondevil
Member since:
2005-07-08

On mobiles, Objective-C is moving to ARC (reference counting) and WP8 is having C++ with the CX extensions which make use of reference counting, alongside the usual .NET runtime.

On the Android, while you can make use of the NDK, actually the whole userspace is Dalvik VM based, even when calling the APIs from C or C++. So the only way to avoid the GC is by using the NDK only APIs, which restrict you to games which don't interact with another applications.

Reply Parent Score: 3

RE[6]: yes... but why?
by dorin.lazar on Fri 7th Sep 2012 11:08 in reply to "RE[5]: yes... but why?"
dorin.lazar Member since:
2006-12-15

Yes, but even with this in mind, performance matters. I wasn't talking about GC anymore; GC can be a performance improvement for a lot of use cases, including most UI bound mobile software

Reply Parent Score: 1

RE[7]: yes... but why?
by moondevil on Fri 7th Sep 2012 13:29 in reply to "RE[6]: yes... but why?"
moondevil Member since:
2005-07-08

Ah ok, there I agree with you.

One should always take care to use the more adequate set of algorithms and data structures for the problem at hand, while taking advantage of the language strengths.

Reply Parent Score: 2