https://issues.dlang.org/show_bug.cgi?id=6401
Iain Buclaw <ibuc...@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuc...@gdcproject.org --- Comment #4 from Iain Buclaw <ibuc...@gdcproject.org> --- Some notes for Walter. The bottleneck is the `static this()` in gtk.d starting line 36. This function itself is over 3800 lines long. Notable problematic functions. 1. dmd/backend/gflow.d: initDNunambigVectors() This function is a massive bottleneck, as you're effectively doing: --- // In initDNunambigVectors() foreach (uint i; 0 .. go.deftop) { // In fillInDNunambig() foreach (uint i; 0 .. go.deftop) { // ... } } --- In the unreduced test, go.deftop = 25144. You are also calling this function twice in dmd/backend/go.d:optfunc. The main entrypoint being constprop(). 2. dmd/backend/gother.d: accumda() Suffers from a similar problem. It is recursively called 25144 times in the OTbinary path. 3. dmd/backend/gflow.d: accumaecpx(): Likewise, it is recursively called - 56572 times in the first iteration (before accumda). - 28286 times in a second iteration (after accumda). 4. dmd/backend/gdag.d: aewalk(): Likewise, it is recursively called 50287 times. --