top time wasters in DMD, as reported by gprof

Peter Alexander peter.alexander.au at gmail.com
Wed Jun 26 22:21:52 PDT 2013


On Tuesday, 25 June 2013 at 16:56:55 UTC, Andrei Alexandrescu 
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.

The problem is not that malloc is slow, but malloc is being 
called too much.

A hierarchical profile would be more useful here, to see exactly 
what's allocating all that memory. I'm also intrigued as to why 
so much string activity is happening (vfprintf!? num_to_str!?)



More information about the Digitalmars-d mailing list