using tuneup

Jason Moxham J.L.Moxham@maths.soton.ac.uk
Fri, 21 Feb 2003 13:31:09 +0000


On Thursday 20 Feb 2003 11:24 pm, Kevin Ryde wrote:
> 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.

Only a bit hairy ! :) , every function seems to be tuned in a different w=
ay ,=20
I imagine some of this is historical baggage , although for some function=
s=20
it's clear why they have been done that way. Anyway I got it going and wo=
rks=20
like a charm , even for the multiple recursive calls (like kara & toom3) =
,=20
excelent.

> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss@swox.com
> https://gmplib.org/mailman/listinfo/gmp-discuss