using tuneup

Kevin Ryde user42@zip.com.au
Fri, 21 Feb 2003 09:24:39 +1000


Jason Moxham <J.L.Moxham@maths.soton.ac.uk> writes:
>
> I'm writing a barrett type division routine for modular arthimetic ,
> and because it is currently only effective above a certain number of
> limbs I have put in a threshold , so that below the threshold
> mpn_tdiv_qr is used and above the threshold the barrett type div is
> used . I'm trying to get the tuneup program with GMP to tune this
> threshold , however the results it gives are wildly wrong , it
> doesn't seem to be changing the threshold at all .

That program is a bit hairy, but the first step is to get the speed
measuring going (with speed.c), so you can see your routine becoming
faster than mpn_tdiv_qr at some size (a divisor size I guess).  Then
you can worry about tuneup locating that size automatically.