This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] randomize benchtests


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.

Siddhesh
--
http://siddhesh.in


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]