This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] randomize benchtests
- From: Allan McRae <allan at archlinux dot org>
- To: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>
- Cc: OndÅej BÃlka <neleai at seznam dot cz>, c at domone dot kolej dot mff dot cuni dot cz, GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 23 Apr 2013 10:24:54 +1000
- Subject: Re: [PATCH] randomize benchtests
- References: <20130422120018 dot GA30323 at domone dot kolej dot mff dot cuni dot cz> <CAAHN_R1pHJLoS3iP7KrQMmA4gPLawvuRWoK8Xy13VPMBbyPk+Q at mail dot gmail dot com> <20130422125625 dot GA30639 at domone dot kolej dot mff dot cuni dot cz> <CAAHN_R3Gq1qn-tu8Jiuvb-n2UjZD3Lo8DSVp1o_C9pBJCRcXZw at mail dot gmail dot com>
On 23/04/13 04:24, Siddhesh Poyarekar wrote:
> On 22 April 2013 18:26, OndÅej BÃlka <neleai@seznam.cz> wrote:
>>>> + int seed = 42;
>>>
>>> You get the same sequence all the time. Use getpid() as seed or even time().
>>>
>> And this is precisely as intended. With that randomization you would get
>> different results each time and we want this to be predictable.
>
> OK.
>
>> This is not wrong. You are interested only on differences between
>> implementations and adding same time from rand_r calls does not change
>> that.
>
> Um yeah, but I have been working towards reducing overhead anyway so
> this seems like a step backward. Anyway, rand_r is constant time, so
> it shouldn't be that bad.
>
>>> If you have total iterations and iters/sec, you can compute average
>>> directly. You've gotten rid of two pieces of core information to add
>>> one piece of derived information. I am not very picky about what the
>>> output looks like though.
>> Well expected value is most important statistical property. Yes, you can
>> take iters/sec and mentally convert them to average time. But I thougth
>> that purpose of computers is simplify tasks that can be performed
>> mechanicaly.
>>
>> Total iterations are useless implementation detail and you should print
>> only usefull data.
>
> The point of keeping total iters was that this was intended to be raw
> data, which can be manipulated by a frontend.
>
> Anyway, this looks fine to me, but I'd like another reviewer to go
> through it since I don't have much of an opinion about the output, but
> someone else may.
>
I have no opinion on the output beyond that the number of iterations
would be useful to include.
Allan