By the way, I still get the following warnings when building MPIR on
AMD64:

gcd.c: In function 'mpz_rgcd':
gcd.c:167: warning: implicit declaration of function 'mpn_rgcd'
gcd.c: In function 'mpz_bgcd':
gcd.c:171: warning: implicit declaration of function 'mpn_bgcd'
gcd.c: In function 'mpz_sgcd':
gcd.c:175: warning: implicit declaration of function 'mpn_sgcd'
gcd.c: In function 'mpz_ngcd':
gcd.c:179: warning: implicit declaration of function 'mpn_ngcd'

Bill.

On Dec 20, 11:37 pm, Bill Hart <goodwillh...@googlemail.com> wrote:
> Hi Jason,
>
> I ran this on my Opteron which also has Magma.
>
> For two 2,000,000 bit numbers with a 1,000,000 bit GCD Magma takes
> 0.42s per GCD but MPIR with Moller patches takes 3.7s (10098810860
> cycles) per GCD.
>
> Half GCD is not faster than fast euclidean until the sizes get quite
> large. You have to do the timings for *much* larger integers. The time
> that the new code takes should be negligible compared to the old code
> for very large sizes due to the asymptotic speedup. At the moment
> without the patches MPIR takes only 4.8s. It's clearly not working.
> For example compare the timings on the GMP website:
>
> http://gmplib.org/devel/
>
> Note that at around 1,000,000 bits it is 10 times faster, not 20%
> faster.
>
> By the way, the code you posted has a variable missing in the final
> printf. It always returns 0.00.
>
> Bill.
>
> On Dec 20, 8:59 pm, "Jason Martin" <jason.worth.mar...@gmail.com>
> wrote:
>
> > I've been running speed some tests with the Moller patches, and it
> > looks to me like they work just fine for larger numbers, but at
> > smaller limb counts they are slower than the original code.  I've
> > attached my test code so that you can see what I'm doing.
>
> > I suspect that I need to add some tuning to figure out what the
> > threshold values are for flipping to the half-gcd based scheme, but
> > otherwise the patches seem to be sound.
>
> > for the random numbers in the test code here's what I see:
>
> > MPIR svn version 1487 (pre-patch): 17,900 cycles
> > MPIR svn version 1503 (current): 16,000 cycles
>
> > --jason
>
> > Jason Worth Martin
> > Asst. Professor of Mathematicshttp://www.math.jmu.edu/~martin
>
> >  Makefile
> > < 1KViewDownload
>
> >  speed_test.c
> > 3KViewDownload
>
> >  read_time_stamp_counter.yasm
> > 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to