[C++-sig] Weave Scipy Inline C++

eric jones eric at enthought.com
Sun Sep 15 08:56:22 CEST 2002


> Ralf, let me stop you before you piss some weave people off ;-).
Whether
> you intend it or not, this sounds like a potshot against weave.
> 
> IIUC, Weave can be used for embedding nontrivial C++ code, if you're
> willing to stick it all inside one function body. Furthermore, tools
like
> weave.blitz() can make an enormous difference by compiling an entire
C++
> expression template corresponding to an arbitrarily complicated Python
                                          ^^^^^^^^^^^^^^^^^^^^^^^  
> expression. Surely that's nontrivial. It's definitely *cool*.

Blitz() only handles Numeric expressions, so it isn't quite that cool.
:-)  Still, it is useful and provides a starting point for handling
arbitrarily complicated code.  Pat Miller is working on that.  Hopefully
we'll have some of his really neat (and kinda sick...) work in weave
within a month or so.  It is tailored to Numeric and is akin to writing
a compiler for Python.  The speed-up on computational stuff is huge and
the calling overhead is very small.  Also, using some of Pyrex's
machinery into weave might get us pretty close to your statement.

> 
> Though I love bicycles and often hate cars, most people don't see it
that
> way: they think of the former as less powerful and less robust. What
> you've
> written could easily sound as though it's trivializing weave. I think
> weave
> offers enormous power to the person who's programming mostly in
Python.
> 
> Actually, it might not be a bad idea to think about merging them, if
you
> consider weave.blitz. Blitz++ was a pioneering effort in
metaprogramming.
> Boost.Python is a next-generation metaprogramming framework. There are
> definitely some interesting possibilities here.

I look forward to the discussion on this.

eric






More information about the Cplusplus-sig mailing list