Why I Use D

Neil Vice sardonicpresence at gmail.com
Mon Mar 31 20:08:28 PDT 2008


"Helmut Leitner" <leitner at wikiservice.at> wrote in message 
news:fsql7g$cpr$1 at digitalmars.com...
> Neil Vice wrote:
>> ...
>> 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
>
> No-one should write such a thing. Benchmarking is an empirical black art
> and there are absolutely no guarantees whatsoever...

That's like saying that the outcome is entirely non-deterministic. Just 
because the problem may be complex doesn't mean there are no guarantees.

Essentially my point is that, because C# & .NET impose more limitations and 
allow less control than D, assuming the best-case scenario for both 
languages D will win out.

Alternatively I would have said that best-case C and D are probably 
equivalent as both languages can get incredibly close to assembler.

To be more specific, let's say you were to hand-code a routine in assembler 
for a specific architecture such that you had (ideally) obtained the optimal 
implementation. If D has embedded assembly support for the architecture then 
you can achieve the exact same result in D. If this support does not exist 
you could probably get quite close with a combination of intrinsics and 
careful (probably involving trial and error) implementation. I would suggest 
that, even with precompiled binaries, you would be very hard-pressed to 
achieve a similar result using C#/.NET . 





More information about the Digitalmars-d mailing list