C++ in non trivial programs, if one cares about not allocating too much on the heap. It seems indeed that the automatic memory management is a major performance killer, and it's not always easy to know in advance what the overall performance of D code will be. But the less work for the GC, the better.

I wonder why is that.. Why would deleting 1 million objects in C++ (using std::shared_ptr for example) have to be slower than the garbage collection freeing a big chunk of million objects all at once. I mean, it would probably block the main thread but the avg rate of deleting objects shouldn't differ from manually doing so right ? So the main issue would be unpredictable pauses (what's a typical delay to expect from cleaning 1000000 objects?) of the main thread and not avg performance I think..

So yes, one can get stellar performance out of D, but I would say right out of the box, it's not automatic, it does require some work where high performance is needed.
Any other tips to get high performance besides the GC issue?

Reply via email to