First cut not the deepest?

Sisyphus sisyphus1 at optusnet.com.au
Fri Mar 23 08:54:22 CET 2007


----- Original Message ----- 
From: "Jim White" <mathimagics at yahoo.co.uk>
To: <gmp-discuss at swox.com>
Sent: Friday, March 23, 2007 5:36 PM
Subject: First cut not the deepest?


>
> Does Windows cause brain damage?
>
> Runnng timing comparisons under Windows is always a
> trifle dodgy, but the anomaly I am seeing is
> particularly baffling.
>
> The test is simple enough. Repeat some non-trivial
> operation R times, report the time taken. Do that that
> N times.
>
> Using either a static or shared library built for a
> Pentium 4 under MinGW, I am consistently getting a
> series of times that increase fairly quickly, then
> seem to stabilise at just under twice the time taken
> for the first set.
>
> For example, here the test program is mpz_mul-ing two
> arguments of about 8K limbs, 1000 times a set:
>
>> test -p 8192 -r 1000 -n 10
> 16:48:38  start test, ops/set = 1000, nreps = 10
> 16:48:47  time =  8.625000
> 16:48:58  time = 11.672000
> 16:49:11  time = 12.734000
> 16:49:24  time = 13.282000
> 16:49:38  time = 13.734000
> 16:49:52  time = 14.109000
> 16:50:06  time = 14.250000
> 16:50:21  time = 14.453000
> 16:50:35  time = 14.500000
> 16:50:50  time = 14.579000
> 16:50:50  avg  = 13.193800
>

For the script you posted - using a static build of GMP on an AMD 64 box 
with Vista64 (but using a MinGW-built 32-bit GMP-4.2.1) I get sane results:

C:\_32\C>bench_gmp -p 8192 -r 1000 -n 10
18:39:34  start test, ops/set = 1000, nreps = 10
18:39:38  time = 4.548000
18:39:43  time = 4.519000
18:39:48  time = 4.545000
18:39:52  time = 4.510000
18:39:57  time = 4.517000
18:40:01  time = 4.511000
18:40:06  time = 4.513000
18:40:10  time = 4.510000
18:40:15  time = 4.511000
18:40:19  time = 4.507000
18:40:19  avg  = 4.519100

On a Win32 box (Windows 2000, P-III, ~1GHz), again with a static MinGW build 
of GMP-4.2.1, I still get sane results. (Only difference is that the time 
blows out to ~13.9 seconds.)

Unfortunately, I don't have a P-IV box with Windows.

Cheers,
Rob 



More information about the gmp-discuss mailing list