www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21070] New: -profile=gc makes the program much slower


          Issue ID: 21070
           Summary: -profile=gc makes the program much slower
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: tim.dlang t-online.de

When compiling a program with -profile=gc it becomes much slower.
GC.stats is called for every allocation,
but it collects more information, than is needed for 
-profile=gc. Replacing the call to GC.stats with a new function,
which only returns the needed information, makes the program fast again.

I will create a pull request later.

Jul 24 2020