Disable GC entirely

Paulo Pinto pjmlp at progtools.org
Sun Apr 7 03:59:47 PDT 2013


Am 07.04.2013 11:10, schrieb Adrian Mercieca:
> Hi
>>
>> D's GC is not as good as some other system programming languages like
>> Oberon or Active Oberon, just to cite two examples from many.
>
> As I said, maybe it's time (IMHO) for D's GC to addresses - or otherwise
> dropped.
>>
>> However, does the current performance really impact the type of
>> applications you are writing?
>
> Yes it does; and to be honest, I don't buy into this argument that for
> certain apps I don't need the speed and all that... why should I ever want
> a slower app? And if performance was not such an issue, to be perfectly
> frank, then Java would more than suffice and I would not be looking at D
> in the first place. D is supposed to be a better C++ (or at least that's
> what I have been led to believe - or like to believe)...... so it's got to
> be an improvement all round. It is a better structured and neater
> language, but if it's going to come at the price of being slower to C++,
> than at the end of the day it is not an improvement at all.

The current compilers just don't have the amount of investment in more 
than 20 years of code optimization like C++ has. You cannot expect to 
achieve that from one moment to the other.

>>
>> I'm asking because I always found the C and C++ communities always care
>> too much about micro optimizations in cases it does not matter. Coming
>> from a polyglot background I never managed to grok that.
>>
>> However there are cases where every byte and every ms matter, in those
>> cases you are still better with C, C++ and Fortran.
>
> But why are you so quick to give up on D being as fast as C++ ?
> Wouldn't it be just awesome if D - with its better constructs and all that
> - was just as fast as C++ ?
> Can't it just be that someone does achieve the best of both worlds?
> I feel that D is very close to that: a great, versatile and powerful
> language... if only the performance was as good as C++'s then it'll be
> what I have always dreamt of.
>
> Just my 2p worth...
>

I am not giving up speed. It just happens that I have been coding since 
1986 and I am a polyglot programmer that started doing system 
programming in the Pascal family of languages, before moving into C and 
C++ land.

Except for some cases, it does not matter if you get an answer in 1s or
2ms, however most single language C and C++ developers care about the 
2ms case even before starting to code, this is what I don't approve.

Of course I think given time D compilers will be able to achieve C++ 
like performance, even with GC or who knows, a reference counted version.

Nowadays the only place I do manual memory management is when writing 
Assembly code.

--
Paulo


More information about the Digitalmars-d mailing list