There was a proposal to maintain a GPL v3+ version of MPIR with some
of the code that has ended up in GMP 4.3.0 in it, as for the most
part, Sage could use it. But it seemed like too much of a distraction
from our current priorities. I don't personally want to get
sidetracked by that, as I expect we'll match GMP feature for feature
in time, but I'd be happy if someone else wanted to maintain this.

The main issues are that the current XGCD code returns different
answers to the asymptotically fast code that is out there, which is a
problem for Sage doctesting, and that maintaining a GPL v3+
distribution would require building on MSVC, Sun and Apple compilers
as well as gcc. That would be quite a lot of work, as currently Brian
Gladman is entirely managing the MSVC side of things and I would
certainly not want to push the maintenance of two versions of MPIR
onto him.

In some cases it would be less work to just contribute features
directly to MPIR to bring the current code up to par.

Bill.

2009/4/21 William Stein <wst...@gmail.com>:
>
> On Tue, Apr 21, 2009 at 9:38 AM, dmharvey <dmhar...@cims.nyu.edu> wrote:
>>
>> Hi folks,
>>
>> I have made a basic spkg for GMP 4.3.0:
>>
>> http://sage.math.washington.edu/home/dmharvey/gmp-4.3.0.spkg
>>
>> I've only tested on a linux opteron system. It builds fine; there are
>> various doctest failures that look related to non-canonical XGCD
>> output. Quite possibly it won't yet even build on other sage-supported
>> systems.
>>
>> To try it out, you will need to remove SAGE_ROOT/spkg/standard/gmp-
>> mpir*.spkg and replace it with the above file, before starting the
>> build. (I'm not sure if you can install it into an existing sage
>> build.) You will also need to replace ecm-6.2.1.p0.spkg with
>>
>> http://sage.math.washington.edu/home/dmharvey/ecm-6.2.2.spkg
>>
>> (Note that this spkg has a hack in the configure script to make it not
>> get confused about different version numbers ("4.3" vs "4.3.0") in
>> gmp.h and libgmp. Hopefully this will be unnecessary in the next
>> release of GMP-ECM.)
>>
>> GMP 4.3.0 has a lot of nice speedups. One of my favourites is the
>> asymptotically improved XGCD implementation, for example (2.6 GHz
>> opteron):
>>
>> ========== vanilla sage 3.4:
>> sage: p = 2^2976221 - 1    # nice big mersenne prime
>> sage: x = Integers(p).random_element()
>> sage: time y = 1/x
>> CPU times: user 43.19 s, sys: 0.02 s, total: 43.21 s
>> Wall time: 43.21 s
>>
>> ========== Magma V2.15-1:
>>> p := 2^2976221 - 1;
>>> x := Integers(p) ! Random(p);
>>> time y := 1/x;
>> Time: 3.590
>>
>> ========== Mathematica 6.0:
>> In[1]:= p = 2^2976221 - 1;
>> In[2]:= x = RandomInteger[p];
>> In[3]:= Timing[y = PowerMod[x, -1, p];]
>> Out[3]= {2.02, Null}
>>
>> ========== sage 3.4 with GMP 4.3.0:
>> sage: p = 2^2976221 - 1
>> sage: x = Integers(p).random_element()
>> sage: time y = 1/x
>> CPU times: user 1.45 s, sys: 0.01 s, total: 1.46 s
>> Wall time: 1.46 s
>>
>> Recently Sage switched from GMP to the MPIR fork. I make no secret of
>> the fact that I disagree with this decision, although I did initially
>> support MPIR.
>
> I just want to remind people that there is a lot more to take into
> account when choosing
> a library than just cherry picked benchmarks:
>
>    * a wide range of benchmarks
>    * support for an important range of platforms and operating systems
>    * the development process
>    * short and longterm goals
>    * talent of developers involved
>    * license
>    * copyright assignment requirements
>    * potential for financial support
>
>  -- William
>
>> I hope that Sage can figure out some way to incorporate
>> the improvements in GMP 4.3.0 (as competing systems like Mathematica,
>> Maple and Magma will soon surely do).
>>
>> david
>>
>> >
>>
>
>
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washington
> http://wstein.org
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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