In article <[EMAIL PROTECTED]>,
 Travis Oliphant <[EMAIL PROTECTED]> wrote:

> Matt Knox wrote:
> 
> >>Moving the implementation to the C-level also has its downside.  To
> >>me, at least, Python code is much more readable and hence easier to
> >>maintain.
> >>
> >>Is there a way that we can implement only the speed-critical methods
> >>in C?
> >>
> >>Cheers
> >>Stéfan
> >>
> >>    
> >>
> >
> >Implementing the whole thing in C also has the side benefit of the 
> >possibility
> >making a nice C level api available to these sub-classes. And I suspect the 
> >core
> >numpy developers are comfortable enough with C that maintainability is
> >*probably* not a huge concern here.
> >
> >But yeah, implementing even just the speed critical parts in C would still 
> >be a
> >nice improvement.
> >  
> >
> Part of the trouble is that sometimes the speed critical parts are how 
> slow Python functions (e.g. __getitem__) are.    You want to avoid that 
> function call and the only way to do that (that I know of) is to create 
> the sub-class in C.

I'm curious why the low level stuff is in C instead of C++? I would have 
thought that C++ templates and possibly even the standard template 
library would be a huge win for coding array-type classes.

-- Russell

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to