> < ^ Date: Tue, 06 Jun 2000 15:03:53 +0200
> < ^ From: Stefan Kohl <kohl@mathematik.uni-stuttgart.de >
> < ^ Subject: Re: calculating benchmark

Dear Forum,

Enis Karaaslan wrote:

I now implement random number generation on UNIX systems and primality =
=3D
tests on GAP. (thesis for the master degree)
I wrote some code for primality tests.

When calculating benchmark, i use "Runtime()" , but the same test can =
=3D
return different values with the same numbers. (becouse of the system =
=3D
load i suppose)

I can use system time but i don't think it will be enough.

Well, timings may differ significantly from test to test of the same
task - as you supposed, this is mainly due to the system load and -
especially when doing calculations that use a lot of memory -
due to swapping times.
For short tasks, a convenient solution to get more precise timings
is just to execute your task several times and calculate the
average time it takes - there are functions for this (written by
Steve Linton) available on the GAP homepage
(ftp://ftp-gap.dcs.st-and.ac.uk/pub/gap/gap4/deposit/gap/timers.g).
For longer tasks, the timings given by Runtime() should be precise
enough in most cases, provided that you do not make 'excessive'
use of swap space (I have some experience here not concerning
primality tests but prime factorization of integers with my share
package factint).

Hope this helps,

Stefan


> < [top]