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


On 03/14/2013 01:36 AM, Siddhesh Poyarekar wrote:
> Hi,
> 
> I've updated the patch a bit because I found that in some cases the
> function calls were eliminated since their return values were not
> used.  So here's v4.1
> 
> Siddhesh
> 
> 	* Makefile.in (bench): New target.
> 	* Rules (bench): Likewise.
> 	(binaries-bench): Generate binaries for functions to
> 	benchmark.
> 	* benchtests/Makefile: New makefile for benchmark tests.
> 	* benchtests/bench-skeleton.c: New skeleton file for benchmark
> 	programs.
> 	* benchtests/exp-inputs: New input file for EXP function.
> 	* benchtests/pow-inputs: New input file for POW function.
> 	* scripts/bench.pl: New script to generate source files for
> 	benchmark programs.

You should have tested at least i386, because you still didn't have the right
types in the printf for 32-bit.

> ./bench-skeleton.c:70:11: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘unsigned int’ [-Wformat]

Here's an incremental patch that fixes that and, IMO, makes the results more
readable.

arm cortex-A15:

Before:
> exp: ITERS:19033555374: TOTAL:4687423674997264089ns, MAX:187010.167000ns, MIN:5.253879ns, 0.000000/ms
> pow: ITERS:48073953056: TOTAL:4696356518798924186ns, MAX:468221.087000ns, MIN:2.080129ns, 0.000000/ms

After:
> exp: ITERS:100000: TOTAL:19.2022s, MAX:266889ns, MIN:190590ns, 5207.73 iter/s
> pow: ITERS:100000: TOTAL:47.5425s, MAX:482874ns, MIN:474051ns, 2103.38 iter/s

x86_64 core-i7:

Before:
> exp: ITERS:100000: TOTAL:9707826489ns, MAX:99094.620000ns, MIN:94726.611000ns, 10.300967/ms
> pow: ITERS:100000: TOTAL:22355547371ns, MAX:232855.636000ns, MIN:210420.638000ns, 4.473163/ms

After:
> exp: ITERS:100000: TOTAL:9.1457s, MAX:95778.7ns, MIN:90963ns, 10934.1 iter/s
> pow: ITERS:100000: TOTAL:21.1351s, MAX:223117ns, MIN:210674ns, 4731.47 iter/s


r~

Attachment: z
Description: Text document


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