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: [v3][PATCH] Framework for performance benchmarking of functions


On Wed, Feb 20, 2013 at 05:21:09PM -0800, Richard Henderson wrote:
> The 1e9 constant needs to be cast to int64_t, lest this expression
> simply overflow on 32-bit hosts.

Right, thanks for catching that.

> There are quite a few hosts for which the resolution of this clock
> isn't good enough to make measuring in the inside loop work.  Can we
> have a look at what clock_getres returns and perhaps measure the
> outside loop?  At least then we'll get *some* sort of answer...
> 
> E.g. ARM Cortex A9 can only measure at 1kHz, but Cortex A15-mp can
> measure at the cpu frequency (1.6GHz, reported by getres as 1ns).

OK, I'll do per-call measurements only for cpus that report resolution
as 1ns since anyhting worse and the faster math functions won't get
meaningful benchmarks.

I wonder if it makes sense to calibrate the benchmarks based on an
estimate of how long a clock_gettime takes, perhaps by doing
consecutive clock_gettime calls (multiple times) and seeing results.

Thanks,
Siddhesh


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