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@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?

Reply via email to