[Numpy-discussion] python numpy code many times slower than c++

Robert Kern robert.kern@gmail....
Tue Jan 20 20:16:39 CST 2009


2009/1/20 Neal Becker <ndbecker2@gmail.com>:
> I tried a little experiment, implementing some code in numpy (usually I
> build modules in c++ to interface to python).  Since these operations are
> all large vectors, I hoped it would be reasonably efficient.
>
> The code in question is simple.  It is a model of an amplifier, modeled by
> it's AM/AM and AM/PM characteristics.
>
> The function in question is the __call__ operator.  The test program plots a
> spectrum, calling this operator 1024 times each time with a vector of 4096.
>
> Any ideas?  The code is not too big, so I'll try to attach it.

Any chance you can make it self-contained?

-- 
Robert Kern

"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 mailing list