Am Fri, 27 Apr 2012 04:18:47 +0000 (UTC) schrieb David Brown <dav...@davidb.org>:
> On 2012-04-25, SomeDude <lovelyd...@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 > >> <lovelyd...@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