[Issue 16513] New: Speed up TemplateInstance.findExistingInstance, hash by mangling
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Sep 19 16:58:41 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16513
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 at puremagic.com
Reporter: code at 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).
--
More information about the Digitalmars-d-bugs
mailing list