Why I Use D
Neil Vice
sardonicpresence at gmail.com
Mon Mar 31 20:01:30 PDT 2008
"bearophile" <bearophileHUGS at lycos.com> wrote in message
news:fsqit4$67p$1 at digitalmars.com...
>>Just the control that D provides compared to C# and the fact that it is
>>compiled directly to machine code mean that D is basically guaranteed to
>>be faster provided sufficient effort is put in if you know what I mean.<
>
> That's a myth. I have personally found situations where that's very false.
> D AAs and GC are sometimes slower or much slower, etc.
My point was not that D is guaranteed to be faster out-of-the-box by any
means. The difference is that if you want to improve the performance of C#
beyond a certain point you have to resort to writing a library in C for
example which you can then call from C#. With D on the other hand you can
write this code directly in D.
If the built-in D GC is slower you can replace it; I believe Tango has
already done this. Could you do this in .NET?
If the D AAs are slow you have the option to write whatever task-specific
data structure you like that can be implemented in assembly if you wish. In
.NET you are limited by the performance of the VM.
Perhaps when criticising C# I am in fact criticising .NET. It is possible
that there is nothing in the C# specification which precludes writing a
direct-to-machine-code compiler and a corresponding replacement
standard-library, but this is a lot more work than writing your own AA
template.
More information about the Digitalmars-d
mailing list