www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15323] New: Module.members and .deferred3 should use data


          Issue ID: 15323
           Summary: Module.members and .deferred3 should use data
                    structure with fast lookup
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code klickverbot.at

On a moderately sized build (yes, per-package), iterating Module::members and
Module::deferred3 over and over again to check whether they already contain a
given template instance takes up a noticeable amount of time (about 5% and 3%
of the total compilation time).

The arrays should probably be replaced by a structure with sub-linear lookup
for an easy compile-time win in template-heavy projects.

Nov 12 2015