Strange measurements when reproducing issue 5650
David Brown
davidb at davidb.org
Thu Apr 26 21:18:47 PDT 2012
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
More information about the Digitalmars-d-learn
mailing list