dmd -profile=gc

Morbid.Obesity via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 27 06:59:32 PDT 2015


On Sunday, 3 May 2015 at 21:11:58 UTC, Walter Bright wrote:
> Just merged in is a new compiler switch that instruments 
> generated code to collect statistics on memory allocation usage 
> and generates a report upon program termination. (Much like how 
> -profile works.)
>
> This was based on a prototype Andrei had written earlier.
>
> Andrei and I suspect it can be of great use in figuring out why 
> a program may be excessively slow or consume excessive memory.
>
> I encourage giving it a try on some non-trivial project, and 
> see if it gives useful information.

I've seen a few tricks that you, Andrei, and others have used for 
profiling and optimization.

This naturally leads to "Is there a solid reference to this 
material in any shape form that isn't found by searching the 
forum"?

Optimization is an important aspect of coding. Having a 
collection of web pages, say wiki like, would be useful to many.

One of the main reasons I only lurk in D is because I do not 
currently have faith in being able to write high performance real 
time applications with it(mainly the GC). Being able to peruse 
some of the optimization strategies and tips that come up in the 
forum would be helpful, but not actually do this in the forum.

E.g., anyone care to start an "optimization" wiki for D?







More information about the Digitalmars-d mailing list