[Numpy-discussion] Multiple Boolean Operations
Thu May 22 13:46:13 CDT 2008
On Thu, May 22, 2008 at 12:26 PM, Stéfan van der Walt <email@example.com> wrote:
> Just to clarify things in my mind: is VTK *that* slow? I find that
> surprising, since it is written in C or C++.
Performance can depend more on the design of the code than the
implementation language. There are several places in VTK which are
slower than they strictly could be because VTK exposes data primarily
through abstract interfaces and only sometimes expose underlying data
structure for faster processing. Quite sensibly, they implement the
general form first.
It's much the same with parts of numpy. The iterator abstraction lets
you work on arbitrarily strided arrays, but for contiguous arrays,
just using the pointer lets you, and the compiler, optimize your code
"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