From 4901076ded69d112422b6407010b3e50cc3fc6d3 Mon Sep 17 00:00:00 2001 From: enge Date: Thu, 6 Feb 2014 13:12:50 +0000 Subject: bench: Speed up tests by executing each one for only 0.1s. git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1447 211d60ee-9f03-0410-a15a-8952a2c7a4e4 --- tools/bench/benchtime.h | 2 +- tools/bench/mpcbench.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/bench/benchtime.h b/tools/bench/benchtime.h index 77ba27f..034618e 100644 --- a/tools/bench/benchtime.h +++ b/tools/bench/benchtime.h @@ -50,7 +50,7 @@ __attribute__ ((__unused__)) int nop)\ double TIME_NOP##func(int n, mpc_t* z, mpc_t* x, mpc_t* y) \ { \ double t; unsigned long int nbcall, mytime; \ - for (nbcall = 1, mytime=0; mytime<250000; nbcall<<=1) \ + for (nbcall = 1, mytime=0; mytime<100000; nbcall<<=1) \ { \ mytime = ACCURATE_TIME_NOP##func(nbcall, n, z, x, y, nop); \ } \ diff --git a/tools/bench/mpcbench.c b/tools/bench/mpcbench.c index cbaadef..821dc61 100644 --- a/tools/bench/mpcbench.c +++ b/tools/bench/mpcbench.c @@ -198,9 +198,10 @@ compute_score (double *zscore, int op, gmp_randstate_t randstate) fflush (stdout); /* ti expressed in microseconds */ + niter /= 10; ti = arrayfunc[i].func_accurate (niter, NB_RAND_CPLX, zptr, xptr, yptr, arrayfunc[i].noperands); - ops_per_time = ceil (100000E0 * niter / (double) ti); + ops_per_time = ceil (1e5 * niter / (double) ti); /* use 0.1s */ printf ("%7lu\n", (unsigned long int) ops_per_time); -- cgit v1.2.1