[Numpy-discussion] NumPtr vs NumPy.i to access C
Sat May 17 19:48:44 CDT 2008
On Sat, May 17, 2008 at 7:39 PM, Nathan Bell <email@example.com> wrote:
> More disingenuous FUD here: http://www.sagemath.org/doc/html/prog/node36.html
For the purposes to which SWIG was applied in that case, the findings
are accurate. The wording is overly general, though; it doesn't talk
about other use cases for which the findings are not applicable. When
the amount of computation in C/C++ is fairly small (multiplying 2 GMP
integers), and the Python-level wrapper function needs to be called
many times, then the overhead of the various SWIG layers can become
significant. When the amount of computation in C/C++ is fairly large
(matmult on sparse matrices), the Python function call overhead will
probably be insignificant.
Making a blanket statement either way is incorrect.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion