MPIR wish list

0 views
Skip to first unread message

Fredrik Johansson

unread,
Jul 5, 2010, 7:54:38 AM7/5/10
to sagedays23, mpir-...@googlegroups.com
Since Bill asked...

* "short" integer multiplication
* fmpz style mpzs (an alternative project would be to switch Sage
Integers over to fmpz without modifying MPIR... is FLINT2 ready for
such a thing?)

Maybe I'll think of some other things later...

Fredrik

Bill Hart

unread,
Jul 5, 2010, 8:12:08 AM7/5/10
to saged...@googlegroups.com, mpir-...@googlegroups.com
On 5 July 2010 12:54, Fredrik Johansson <fredrik....@gmail.com> wrote:
> Since Bill asked...
>
> * "short" integer multiplication

Do you mean mpz_mullo and mpz_mulhi? That would be an interesting
project. Of course we already have this at the mpn level, but much
more work could be done on this to make it better.

> * fmpz style mpzs (an alternative project would be to switch Sage
> Integers over to fmpz without modifying MPIR... is FLINT2 ready for
> such a thing?)

The flint2 fmpz interface could be used straight away. The problem is
there is a namespace conflict with fmpz's in flint1 (which are not the
same thing).

They could be renamed temporarily (say to gmpz's) and we'll rename
back later when flint2 goes.

Otherwise, this is one of the most developed interfaces in flint2 and
should be ok to use.

Bill Hart

unread,
Jul 6, 2010, 5:49:35 AM7/6/10
to saged...@googlegroups.com, mpir-...@googlegroups.com
Frederick is working on mpz_mulhi, however one thing we *really* need
(since the interesting case for his applications is for a small number
of limbs) is an x86_64 assembly version for the basecase, as at
present I think we just use a full multiplication. I think this should
save a large percentage of the time (nearly half I think).

Jason, do you by any chance have any code for this?

Bill.

Bill Hart

unread,
Jul 8, 2010, 2:23:28 AM7/8/10
to ja...@njkfrudils.plus.com, mpir-...@googlegroups.com, saged...@googlegroups.com
The important case is size n * size n to top n limbs, if I understand correctly.

But in the basecase, maybe it is just as easy to do n1 * n2 -> n1 high limbs ?

Bill.

On 7 July 2010 22:36, Jason Moxham <ja...@njkfrudils.plus.com> wrote:


> On Tuesday 06 July 2010 10:49:35 Bill Hart wrote:
>> Frederick is working on mpz_mulhi, however one thing we *really* need
>> (since the interesting case for his applications is for a small number
>> of limbs) is an x86_64 assembly version for the basecase, as at
>> present I think we just use a full multiplication. I think this should
>> save a large percentage of the time (nearly half I think).
>>
>> Jason, do you by any chance have any code for this?
>>
>

> I can easily write one , which one do we want though
> ie size n * size n to top n digits or the general xn* yn to zn or some
> inbetween one?

Reply all
Reply to author
Forward
0 new messages