www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11859] New: Slow compilation with -O with dmd

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11859

           Summary: Slow compilation with -O with dmd
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2014-01-02 08:44:38 PST ---
Created an attachment (id=1309)
Program that produces a textual representation of the Mandelbrot set.

The very C-style program in attach compiles in less than 0.4 seconds with "dmd
-release -noboundscheck" (dmd 2.064), but it takes more than one hour (I have
measured about 68 minutes on the same PC) if I add the "-O" switch.

The same program with ldc2 "ldmd2 -release -noboundscheck" compiles in about
1.9 seconds, and in 6.9 seconds if I add "-O". (and the runtime of this
ldc2-compile is almost half as the optimized dmd-compile).

A very similar C program is compiled by GCC 4.8 with "gcc -O3" in about 6.7
seconds.

So I think there is some problem in dmd with -O.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 02 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11859



--- Comment #1 from bearophile_hugs eml.cc 2014-01-02 08:50:48 PST ---
(In reply to comment #0)
 but it takes more than one hour (I have
 measured about 68 minutes on the same PC) if I add the "-O" switch.
 
 The same program with ldc2 "ldmd2 -release -noboundscheck" compiles in about
 1.9 seconds, and in 6.9 seconds if I add "-O".

It means dmd here compiles about 600 times slower than ldc2, despite ldc2 optimizes more the program. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 02 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11859


Artem Tarasov <lomereiter gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |lomereiter gmail.com
         Resolution|                            |DUPLICATE


--- Comment #2 from Artem Tarasov <lomereiter gmail.com> 2014-01-02 12:23:29
PST ---
*** This issue has been marked as a duplicate of issue 7157 ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 02 2014