top time wasters in DMD, as reported by gprof

Iain Buclaw ibuclaw at ubuntu.com
Tue Jun 25 10:20:04 PDT 2013


On 25 June 2013 17:56, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> On 6/25/13 2:13 AM, Iain Buclaw wrote:
>>
>> On 25 June 2013 07:46, Marco Leise<Marco.Leise at gmx.de>  wrote:
>>>
>>> Am Mon, 24 Jun 2013 21:01:36 +0200
>>>
>>> schrieb Martin Nowak<code at dawg.eu>:
>>>
>>>> On 06/24/2013 08:43 PM, Martin Nowak wrote:
>>>>>
>>>>>
>>>>> I can try to install kernel debuginfo that 12% might contain some
>>>>> useful
>>>>> information.
>>>>
>>>>
>>>> http://codepad.org/gWrGvm40
>>>
>>>
>>> Interesting. So to troll a bit, do I see it right, that dmd is
>>> mostly a Unicode conversion and memory allocation tool ?
>>>
>>
>> The D front end does nothing *but* allocate memory... and sometimes
>> from all this allocation (if your computer doesn't die) a compiled
>> program is produced.
>
>
> Then maybe it should use its own malloc that uses the bump-the-pointer
> approach from large chunks allocated with malloc.
>

I meant it in the most light hearted way possible.  Though it's no
secret that heavily templated code, coupled with string mixins (eg:
Neat is a good example which consumes at least 3GB memory to compile
one module IIRC) can see memory allocations sore.  I do believe feep
preloads the boehm-gc when compiling to mitigate this.  :o)


--
Iain Buclaw

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


More information about the Digitalmars-d mailing list