www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4900] New: compiler still slow due to a single function

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4900

           Summary: compiler still slow due to a single function
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: schveiguy yahoo.com



05:20:20 PDT ---
As shown in bug 4721, there is still a problem in the compiler when compiling
projects with a large number of symbols.  Here is a profiled version of dmd
2.048 compiling unit tests for dcollections:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 80.31     11.99    11.99    19000     0.63     0.63  searchfixlist
  0.67     12.09     0.10   203173     0.00     0.00  StringTable::search(char
const*, unsigned int)
  0.60     12.18     0.09   369389     0.00     0.00  Lexer::scan(Token*)
  0.54     12.26     0.08   953613     0.00     0.00  ScopeDsymbol::search(Loc,
Identifier*, int)
  0.47     12.33     0.07  1449798     0.00     0.00  calccodsize
...

Note the searchfixlist function uses 80% of the runtime (the compiler takes 17
seconds to produce a result), but only has 19000 calls.  Compare that to other
functions which have orders of magnitude more calls but nothing takes more than
0.7%.

An examination of the searchfixlist function shows that it is a search through
a linked list.  I'm unsure if the same methodology (replace with hash) can be
applied as was in issue 4721, but it would be good to investigate possible
ideas to replace the algorithm there.

I opened this as a separate bug, because the original bug in 4721 was fixed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 20 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4900


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com



12:57:31 PST ---
Yes, the linked list should be replaced with a hashtable.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 23 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4900


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc



See also bug 5276 for another possible (smaller) benchmark.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 25 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4900


Trass3r <mrmocool gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrmocool gmx.de



Is this still the case? There was this commit:
https://github.com/D-Programming-Language/dmd/commit/b329817

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 11 2012