[sage-devel] Re: matrix multiply with huge entries

2007-10-24 Thread Bill Hart
Don't know it it is any help, but at 3,000,000 bits, FLINT integer multiplication is about 1.4 times the speed of the current GMP. Presumably Strassen does some integer multiplications. Bill. On 24 Oct, 03:00, "William Stein" <[EMAIL PROTECTED]> wrote: > > Actually, soon I will be doing matrix m

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread William Stein
> Actually, soon I will be doing matrix multiply over Z/p^N for some > large N, so the matrix_modn_dense thing is relevant. Maybe, but unfortunately matrix_modn_dense is only for small p. > Another question: for large moduli like this, does it delay the > reduction until after the adds/subs, eit

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread Clement Pernet
Hi everyone, > We do have A._multiply_linbox(B), but we never > use it by default, since when we first wrapped it sadly turned out > to be slower than using our own multi-modular implementation. > This is the sort of thing that may change someday, I hope... Yep, that should change pretty soon! I

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread Robert Bradshaw
On Oct 23, 2007, at 6:51 PM, David Harvey wrote: > On Oct 23, 2007, at 9:47 PM, William Stein wrote: > >> >> On 10/23/07, David Harvey <[EMAIL PROTECTED]> wrote: For huge Z, I wonder if it's still trying to do multi-modular? That would probably be bad. I'm also not sure how much of the

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread David Harvey
On Oct 23, 2007, at 9:47 PM, William Stein wrote: > > On 10/23/07, David Harvey <[EMAIL PROTECTED]> wrote: >>> For huge Z, I wonder if it's still trying to do multi-modular? That >>> would probably be bad. I'm also not sure how much of the dispatching >>> is done in Linbox vs. Sage. >> >> Multim

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread David Harvey
On Oct 23, 2007, at 9:43 PM, Robert Bradshaw wrote: >> 1) mpz_sizeinbase(..., 2) gives the number of bits in the number. >> This will be O(1), but has to count how many bits are used in the >> highest-order word. mpz_sizeinbase(..., 16) or mpz_sizeinbase(..., >> 32) may or may not be faster. >>

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread William Stein
On 10/23/07, David Harvey <[EMAIL PROTECTED]> wrote: > > For huge Z, I wonder if it's still trying to do multi-modular? That > > would probably be bad. I'm also not sure how much of the dispatching > > is done in Linbox vs. Sage. > > Multimodular would be terrible. You don't get any of the benefit

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread Robert Bradshaw
On Oct 23, 2007, at 6:37 PM, cwitty wrote: > On Oct 23, 6:24 pm, Robert Bradshaw <[EMAIL PROTECTED]> > wrote: >> Is there a way to get the size of an integer (really fast, like a >> macro getting the number of words)? One could perhaps override >> _strassen_default_cutoff (though I don't know how

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread cwitty
On Oct 23, 6:24 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > Is there a way to get the size of an integer (really fast, like a > macro getting the number of words)? One could perhaps override > _strassen_default_cutoff (though I don't know how much overhead this > would be for matrices with sm

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread William Stein
On 10/23/07, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > Is there a way to get the size of an integer (really fast, like a > macro getting the number of words)? One could perhaps override > _strassen_default_cutoff (though I don't know how much overhead this > would be for matrices with smallish

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread David Harvey
On Oct 23, 2007, at 9:24 PM, Robert Bradshaw wrote: > Is there a way to get the size of an integer (really fast, like a > macro getting the number of words)? One could perhaps override > _strassen_default_cutoff (though I don't know how much overhead this > would be for matrices with smallish en

[sage-devel] Re: matrix multiply with huge entries

2007-10-23 Thread Robert Bradshaw
Is there a way to get the size of an integer (really fast, like a macro getting the number of words)? One could perhaps override _strassen_default_cutoff (though I don't know how much overhead this would be for matrices with smallish entries). One can always enforce it by doing M._multiply_