[C++-sig] Weave Scipy Inline C++
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Sun Sep 15 04:17:12 CEST 2002
--- David Abrahams <dave at boost-consulting.com> wrote:
> Boost doesn't provide any facilities for on-demand compilation of C++ code
> from Python, if that's what you're getting at.
Boost.Python is a high-throughput factory for Python "built-in" types. Instead
of using the few native types (list, tuple, dict) you can easily make types
that are tailored for specific needs.
I am using Boost.Python in combination with SCons, which is much more mature
than the version number suggests. SCons is suitable as a "compilation on
I am wondering how much of a run-time difference it can make if some trivial
pieces of compiled code working on objects through the (slow b/o dynamic
typing) Python API are embedded in Python. If speed is a premium you can gain
much more if the C++ code operates on native C++ types, without the overhead of
the Python API for accessing data items. This is precisely what Boost.Python
gives you. Typically, I cross the language boundary only once to do an
"expensive", non trivial operation in pure C++, and the result is a wrapped C++
object that can conveniently be inspected from Python.
Does it make sense to put Weave and Boost.Python together? Let me try an
analogy: if you choose Weave you are choosing a bicycle, and if you choose
Boost.Python you are choosing a car. Obviously the world needs both bicycles
and cars, but would you use a car as a building block for a bicycle?
Do you Yahoo!?
Yahoo! News - Today's headlines
More information about the Cplusplus-sig