www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - -profile and the gc

reply kenny <funisher gmail.com> writes:
I had some array code that I had written and it was running horrendously slow.
I ran the -profile flag and it didn't really help because it just told me that
the slow function was slow...

I had a feeling that it was probably the way I was handling memory, so I
prefeched 2000 places, then reset the length back to zero and turned off the
GC. That sped up the code by like 3-4 times.

It would be really nice if -profile was telling me how much time each function
was spending in GC related functions... Is this possible?
Apr 30 2007
parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
kenny wrote:
 It would be really nice if -profile was telling me how much time each function
was spending in GC related functions... Is this possible?
It should be possible, but you may have to recompile phobos with -profile to do it...
Apr 30 2007