Does D have too many features?

Iain Buclaw ibuclaw at ubuntu.com
Mon Apr 30 09:54:37 PDT 2012


On 30 April 2012 17:44, Iain Buclaw <ibuclaw at ubuntu.com> wrote:
> On 30 April 2012 17:16, SomeDude <lovelydear at mailmetrash.com> wrote:
>> On Monday, 30 April 2012 at 16:14:58 UTC, SomeDude wrote:
>>>
>>> On Monday, 30 April 2012 at 15:19:29 UTC, Alex Rønne Petersen wrote:
>>>>
>>>> On 30-04-2012 11:46, SomeDude wrote:
>>>>
>>>> I don't have a clone of my repo from where I am now, so I can't count,
>>>> but it usually takes around ~30 seconds with DMD, ~2 minutes with GDC.
>>>
>>>
>>> For how many files/lines of code ?
>>
>>
>> And on what hardware ? I'd like to have a bit of an idea of how
>> fast the compilers really are.
>
> That sort of speed difference sounds about right.  I'm not sure how
> the DMD backend works, but I assume that there is no more than about 3
> passes.  A conversion from D Frontend AST to DM Backend AST, possibly
> a peephole optimiser, then an output to object code.
>
> GCC backend has some 50+ passes it processes the generated AST through
> passed from GDC. Not to mention it only outputs assembly code.  So
> there is some overhead for calling AS to compile to object code
> (something that DMD just compiles straight to), and double overhead
> for calling LD to link the resultant binary/library.
>
>


Having said that, I did produce a report from GDC once with a list of
times it takes to compile D2 code (in this instance, libphobos and
druntime).

http://iainbuclaw.files.wordpress.com/2010/09/d2-time-report2.pdf

TOTAL is the total time taken (ie: 0.08 seconds in the first file),
and the other elements are a breakdown of what passes took the longest
amount of processing time during the entire compilation.


If you could get DMD to pull off a similar report, you'd have
something nice to compare to. ;-)


Regards

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list