[mpir-devel] Re: A talk on MPIR

2009-05-23 Thread Bill Hart
I really mean both. It's possible that new MPN_COPY code which we'll have relatively soon, will remove some of the performance deficit, but there are still many cases where one can avoid a copy altogether, use mpn's directly instead of mpz's or otherwise avoid using mpz_import/export with its asso

[mpir-devel] Re: A talk on MPIR

2009-05-23 Thread Marc
On May 22, 9:49 pm, Bill Hart wrote: > The main reason I recommended not to use that function in time > critical stuff is it is very, very slow (for reasons I don't > understand). When the endianness and everything is right, mpz_import and mpz_export use MPN_COPY which calls copyi (on platforms

[mpir-devel] Re: A talk on MPIR

2009-05-23 Thread Gonzalo Tornaria
On Fri, May 22, 2009 at 11:29 PM, Craig Citro wrote: > >> That link no longer works but when I skimmed it early it recommended >> to never use mpz_import and mpz_export. Is there a particular reason? >> (I use both functions in gmpy to convert between the internal >> representation of a Python lo

[mpir-devel] Re: A talk on MPIR

2009-05-22 Thread Bill Hart
The main reason I recommended not to use that function in time critical stuff is it is very, very slow (for reasons I don't understand). The talk was about writing highly time critical code. The best way around that is to roll your own, which can often be made much faster. Bill. 2009/5/23 Willi

[mpir-devel] Re: A talk on MPIR

2009-05-22 Thread William Stein
On Fri, May 22, 2009 at 7:13 PM, Case Vanhorsen wrote: > > On Wed, May 20, 2009 at 8:29 PM, Bill Hart > wrote: >> >> Today at Sage Days 15 in Seattle, I gave a talk on MPIR. >> >> I've been experimenting with the Sage notebook, which is very capable, >> but I am no, hence the (somewhat broken)

[mpir-devel] Re: A talk on MPIR

2009-05-22 Thread Craig Citro
> That link no longer works but when I skimmed it early it recommended > to never use mpz_import and mpz_export. Is there a particular reason? > (I use both functions in gmpy to convert between the internal > representation of a Python longint and an mpz.) > We also do the same thing in Sage to c

[mpir-devel] Re: A talk on MPIR

2009-05-22 Thread Case Vanhorsen
On Wed, May 20, 2009 at 8:29 PM, Bill Hart wrote: > > Today at Sage Days 15 in Seattle, I gave a talk on MPIR. > > I've been experimenting with the Sage notebook, which is very capable, > but I am no, hence the (somewhat broken) notes from my talk are > available here: > > http://www.sagenb.org/h