www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16513] New: Speed up TemplateInstance.findExistingInstance,


          Issue ID: 16513
           Summary: Speed up TemplateInstance.findExistingInstance, hash
                    by mangling
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

We still have a few reports about extremely slow
TemplateInstance.findExistingInstance performance. What can be seen in profiles
is an excessive amount of TemplateInstance comparisons for lookups in the hash
table that eat ~20% of the compilation time.
Maybe we're producing an unsuited hash that isn't order dependent?
Or it's just an extreme number of instances with many arguments?

Still have to investigate further, but since issue 7469 got fixed we might now
hash by the mangling of the template (.getIdent) instead of doing an expensive
arrayObjectMatch on RootObjects (using a "virtual" match function).

Sep 19 2016