[Issue 2396] New: -O causes very long execution time on foreach loop of large array of structs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 6 12:29:04 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2396
Summary: -O causes very long execution time on foreach loop of
large array of structs
Product: D
Version: 2.019
Platform: PC
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: schveiguy at yahoo.com
While porting Tango to D2, I've found the attached file (modified to compile
under phobos) doesn't finish compiling in a reasonable amount of time (a.k.a
never).
The data table is from the Tango locale package, I stripped out the struct only
so there isn't any real tango code, just data.
If I compile the file without -O it compiles in 6 seconds, which seems
reasonable since it's 600k of data.
If you comment out most of the lines in the table, it compiles quickly. As you
add lines back in, the runtime seems to grow exponentially (not scientifically
verified).
This file compiles fine with -O under dmd 1.x, Here's a list of dmd2 compilers
that I had on my system to try out:
2.015, 2.016, 2.018: also fails
2.006, 2.007: works
Note that in 2.006 and 2.007, it compiled much quicker with -O (.3 seconds)
than without -O using the compilers that fail (6 seconds)
--
More information about the Digitalmars-d-bugs
mailing list