On Friday 16 March 2007 14:10, William Stein wrote:
> > It's not just slowness (which as you say, still needs to be
> > demonstrated). Another issue is maintainability. If we can wrap C++
> > directly in ntl.pyx, why have another C++ layer? For example, when I
> > was writing the fast ZZ<->mpz_t code a few weeks back, I needed to
> > touch three layers of code: Polynomial_integer_dense, ntl.pyx, and
> > ntl_wrap.cc. It was pretty annoying.
>
> Yes, but in some cases the resulting code is vastly easier to read
> and to write -- this is definitely the case with the Linbox wrapper,
> but is probably not the case with the ntl wrapper.

I wanted to write directly to NTL so as to avoid the pain of maintaining 
layers as David describes.  However, I think that keeping ntl_wrap.cc around 
is important because I think we will find a variety of utility functions 
which are most convenient to write in C++.  One of these is go back and forth 
from ZZ to mpz_t in fast ways.

This is essentially done, but it's a bit of pain to write code to because the 
functions in ntl_wrap.cc use pointers, whereas NTL uses references.  It's 
just not consistent.

--
Joel

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to