Strange measurements when reproducing issue 5650

Marco Leise Marco.Leise at gmx.de
Fri Apr 27 06:28:30 PDT 2012


Am Fri, 27 Apr 2012 04:18:47 +0000 (UTC)
schrieb David Brown <davidb at davidb.org>:

> On 2012-04-25, SomeDude <lovelydear at mailmetrash.com> wrote:
> > On Wednesday, 25 April 2012 at 15:35:44 UTC, Steven Schveighoffer 
> > wrote:
> >> On Wed, 25 Apr 2012 07:27:29 -0400, SomeDude 
> >> <lovelydear at mailmetrash.com> wrote:
> >>
> >>> On Wednesday, 25 April 2012 at 08:34:40 UTC, SomeDude wrote:
> >>>
> >>> Noone reproduces this ?
> >>
> >> On my linux box, it runs in about 580ms, with or without the 
> >> writeln.
> >>
> >> This is what I would expect.
> >>
> >> But things can be strange when dealing with GC timings.  Have 
> >> you tried profiling the code to see where the time is being 
> >> added?
> >>
> >> -Steve
> >
> > Did you compile with  dmd -O -inline -release ?
> 
> I get fairly consistent result on Linux with dmd, but one oddity with gdc.
> 
>   With the first writeln in and the second commented out:
>   gdmd -O slow.d
>   time ./slow
>    ... 0.342 total
>   gdmd -O -release slow.d
>   time ./slow
>    ... 2.866 total
> 
> If I put both writelns in, I don't see the fast version.
> 
> % gdc --version
> gdc (Debian 4.6.2-4) 4.6.2
> 
> David

I cannot reproduce this with the same GCC version and the latest GitHub sources for GDC. Is that behavior consistent after clean recompiles? I get the ~3 seconds result no matter how I compile.

-- 
Marco



More information about the Digitalmars-d-learn mailing list