www.digitalmars.com         C & C++   DMDScript  

D.gnu - Compiling with gdc vs. gdmd

reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
Hello all,

First, congratulations to the GDC team -- I'm playing with D for the first time 
in quite a while thanks to the up-to-date gdc 4.6 packages in the upcoming 
Ubuntu LTS release.  It's great to see that D 2.0 now has this kind of 
mainstream distro support.

Anyway, a question about the gdc versus gdmd interfaces to the compiler.  I've 
noticed that compiling with the options

   gdmd -O -release -inline

produces a much faster executable (about twice as fast) as the typical
gcc-style 
options I would use,

   gdc -O2 [or -O3]

Can anyone advise on appropriate gdc options to pick up the same speed level?

Thanks and best wishes,

     -- Joe
Apr 02 2012
parent Trass3r <un known.com> writes:
    gdmd -O -release -inline

 produces a much faster executable (about twice as fast) as the typical  
 gcc-style options I would use,

    gdc -O2 [or -O3]

 Can anyone advise on appropriate gdc options to pick up the same speed  
 level?
Basically -frelease is missing. Use -vdmd with gdmd to see the command.
Apr 02 2012