This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] Porting string performance tests into benchtests
- From: David Miller <davem at davemloft dot net>
- To: siddhesh at redhat dot com
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 03 Apr 2013 12:35:22 -0400 (EDT)
- Subject: Re: [RFC] Porting string performance tests into benchtests
- References: <20130403101130 dot GE20842 at spoyarek dot pnq dot redhat dot com>
From: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Wed, 3 Apr 2013 15:41:30 +0530
> I also noticed that the string benchmark programs use the hp-timing
> macros, that are essentially raw instructions that get the timestamp
> from the cpu. While this is very low overhead compared to the syscall
> approach of clock_gettime, it may not necessarily be an accurate
> picture of performance compared to CLOCK_PROCESS_CPUTIME_ID since the
> former simply a monotonically increasing clock while the latter is an
> account of the cpu time consumed by the process. I'd like to hear
> thoughts in favour/against either of these. As of now I am inclined
> towards continuing use of clock_gettime throughout (and hence also for
> the string benchmarks once I port them over) due to the advantage I
> mentioned above.
I strongly perfer the raw cpu cycle counter read.