This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: ping: [v2][PATCH] Framework for performance benchmarking offunctions
On Thu, Jan 17, 2013 at 10:38:56PM +0530, Siddhesh Poyarekar wrote:
> On Thu, Jan 17, 2013 at 10:46:25AM -0600, Steven Munroe wrote:
> > On many platforms clock_gettime() still requires a system call, which is
> > swamp the measurement you are trying to make.
> >
> > You need to make sure there are enough iterations within the BENCH_FUCC
> > so that the clock_gettime(0 overhead is less then 1% of the total.
> >
>
> Oh yes, and that will make it difficult to measure fast paths in math
> functions (but do we need to measure them at all to begin with?). The
> slow paths are currently slow enough that it's easy to have them
> running up to 30 seconds or so on a few million iterations. That
> should
One application of precise measurements is hook function to find values
that cause function to run slow. (Which I plan to add to my profiler.)
Also precision ended my attempt to make my tool portable that I do not
have clock precise enough except with rdtsc (and perhaps tick register on
sparc.)
This is problem with string functions as effectivity is mostly affected
by how friendly implementation is to branch prediction.