DMD is faster than LDC and GDC

Daniel Kozak via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 12 05:08:59 PST 2015


V Thu, 12 Nov 2015 12:38:47 +0000
John Colvin via Digitalmars-d <digitalmars-d at puremagic.com> napsáno:

> On Thursday, 12 November 2015 at 12:23:11 UTC, Daniel Kozak wrote:
> > V Thu, 12 Nov 2015 12:10:30 +0000
> > John Colvin via Digitalmars-d <digitalmars-d at puremagic.com> 
> > napsáno:
> >  
> >> On Thursday, 12 November 2015 at 11:59:50 UTC, Daniel Kozak 
> >> wrote:  
> >> > [...]  
> >> 
> >> What versions of these compilers? I suspect the majority 
> >> (maybe 80%-ish) of the time is spent allocating memory, so you 
> >> might be seeing GC improvements in recent DMD  
> >
> > DMD 2.069
> >
> > LDC 2.067
> >
> > GDC 2.065
> >
> > No it is not cause by memory allocations.
> >
> > It seems DMD can recognize that fmttable has same result every 
> > time, so it does compute it only once.  
> 
> Ok, then my second hypothesis is that dmd is inferring the pure 
> attribute for fmttable because it returns auto (new in 2.069 
> IIRC), which enable the above optimisation that you have noted. 
> Gdc and ldc (and dmd) can do similar things in their backend, but 
> perhaps not here.
> 
> Do you have older dmd versions on hand to test?

Yes (DVM) and it is same for older versions (2.066.1, 2.067.1)



More information about the Digitalmars-d mailing list