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: [RFC] Porting string performance tests into benchtests


From: Roland McGrath <roland@hack.frob.com>
Date: Thu, 11 Apr 2013 13:53:35 -0700 (PDT)

>> And on sparc chips I don't have the issues that can make the cpu cycle
>> counter inaccurate or less usable as a timing mechanism.
> 
> On every machine it's a global counter and so it's subject to false
> accounting due to process scheduling.  That's what CLOCK_THREAD_CPUTIME_ID
> avoids.

That's why you take many samples and weed out the outliers.

If you use CLOCK_THREAD_CPUTIME_ID, the cost of the measurement
exceeds the cost of the thing that you're measuring.

It is not appropriate for cycle level analysis of performance
critical assembler code.


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